Wednesday, February 27. 2008
Here is the easiest process I have found for setting up Ruby and PostgreSQL on OS X Leopard at this time.
I recommend PostgreSQL for Mac instead of fink as it is more actively maintained and easier to install. Note that when downloading, use the alternate download not the Sourceforge links, as the Sourceforge download is not current and has issues. This installer places the PostgreSQL CLI commands in /Library/PostgreSQL8/bin/ and will auto-start PostgreSQL on system startup. It includes some graphical tools, but I recommend ignoring them and and installing pgAdmin III if you want an administration GUI (I usually just use the CLI tools).
Ruby has a couple PostgreSQL gems, I recommend ruby-pg which appears to be the only one actively maintained. The easiest way to get it installed is to download the latest .gem, then run the following command to install it in the directory where you saved it (replace the version number as necessary):
PATH=$PATH:/Library/PostgreSQL/bin/ gem install pg-0.7.9.2008.02.05.gem
Don't waste your time trying to find documentation for this gem online, point your browser at the documentation on your local machine, which for this version was at:
file:///Library/Ruby/Gems/1.8/doc/pg-0.7.9.2008.02.05/rdoc/index.html
Wednesday, February 13. 2008
The latest pre-release version of Firefox 3 is available. As a main focus of this release, performance and memory usage are improved. In particular Zimbra, the most heavyweight web application I use, has much better performance when used with this version. A more native look and feel on OS X and Growl notification support are nice features too. It is enough of an improvement that I do not intend to go back to version 2 after experiencing this pre-release.
Continue reading "Firefox 3 Beta 3 Released"
Tuesday, February 5. 2008
I use the built-in Apache 2.2 ajp ProxyPass support when deploying Tomcat and JBoss applications via Apache. When doing so, be careful your slashes match up or you can have subtle problems with applications which use redirects. For example, I was deploying a JSPWiki but having an odd problem with authentication where logins would seem to fail but then work fine if I manually reloaded the page. I was using this Apache configuration:
ProxyPass /webdevwiki ajp://127.0.0.1:8009/webdevwiki/
ProxyPassReverse /webdevwiki ajp://127.0.0.1:8009/webdevwiki/
This appeared to work fine, but when logging in an extra slash would get added to the Login.jsp redirection page. This kept the redirect to the main page from working, causing it to reload the Login.jsp infinitely even though login had been successful. A manual click of the reload button fixed the site, with authentication and all other functions working until trying to log in again.
ProxyPass /webdevwiki ajp://127.0.0.1:8009/webdevwiki
ProxyPassReverse /webdevwiki ajp://127.0.0.1:8009/webdevwiki
Removing the extra slashes as shown fixed this issue.
Friday, February 1. 2008
After talking about it for a long time, we finally got new windows installed in the living room at Perry View Farm. The old ones were leaking, difficult to open, and had failed seals causing moisture build-up between the panes.
Vinyl new construction windows from Dove Windows (5000 series), these are double hung models that replace the crank-out windows we had before. The additional glass area due to the thinner sides and middle is the most noticeable difference, adding a lot more light and visibility to the room.
Thursday, January 3. 2008
Apache 2.2's mod_authnz_ldap has significant differences from Apache 2.0's mod_auth_ldap. Moving to 2.2, some significant changes are needed which can be confusing and cause seemingly nonsensical authorization loops if directives are missed.
Necessary modules- auth_basic
- authz_user
- ldap
- authnz_ldap
Directives
AuthType basic
AuthBasicProvider ldap
AuthName "My Site"
AuthLDAPURL ldap://ldap1.example.com/ou=People,o=Example
AuthzLDAPAuthoritative Off
Require valid-user
AuthBasicProvider ldap is needed instead of AuthLDAPEnabled on , which no longer exists as a valid directive.
AuthzLDAPAuthoritative Off is needed to allow the authorization to fall though to Require valid-user , otherwise you will get auth _ldap authorise: authorisation denied in your debug messages after it successfully authenticates the user but fails to find an authorization directive to allow access. These messages will not show up in your logs by default, so it can be confusing if you watch the ldap server, see authentication succeed, and wonder why it keeps requesting a username and password.
Saturday, December 22. 2007
Our family has made ice cream using this recipe for many years. It produces an ice cream with a fluffy texture which is quite tasty and unique but does not freeze well (it tends to become rock hard in the freezer). We have always used a hand-crank White Mountain churn for it. It turns into a whole family activity with someone turning the crank (we make a game out of never letting it stop), a drain hole opener (it is critical that the drain hole stay open unless you are trying to make salty ice cream), and a runner to add ice and rock salt as well as retrieve supplies as needed.
Continue reading "Homemade Ice Cream Recipe for 6 quart Churn"
Thursday, December 20. 2007
When storing preferences for applications on Java, there is a built in Preferences API. If you need full control of preference storage or need to change it from applications external to Java or manually, one of the options I discussed last year may be better (if you need an XML file in a specific location for example), but if you just need simple cross-platform preference storage, the built in option is ideal.
Usage Summary
import java.util.prefs.Preferences;
Preferences prefs = Preferences.userNodeForPackage( getClass() );
prefs.get("keyName", "default value");
prefs.put("keyName", "new value");
The JavaDoc for it is quite confusing, so try this tutorial on java.util.prefs.Preferences instead.
Thursday, December 6. 2007
Netbeans 6 has been released. I have been using it since beta 1 and have found it an invaluable improvement over the old version. The editor and layout is improved, and subversion support is now built in. The major change in this release is the language support; Ruby support is now available, and there is a PHP plugin. I'll report as I try these other plugins over the next few weeks.
Tuesday, October 30. 2007
When building Swing applications customized for OS X, note that for more complex applications with multiple JFrames, a JFrame containing a JMenuBar must be initialized first. If a JFrame with no JMenuBar is created first, neither the custom application name nor the menus will work correctly.
Continue reading "OS X: JFrame with JMenuBar Must Be First"
Thursday, October 25. 2007
Wish you could have multiple keys in your Map class? Want to add constraints easily to your collections to ensure the data is as expected? Both of these and much more are available in the Google Collections Library. Obviously these can be coded yourself; but this library offers a more elegant and better tested way to build some of these useful data structures.
Wednesday, October 10. 2007
When receiving the error java.net.MalformedURLException: unknown protocol: dummy , check everything included in all libraries and classpath elements for old or conflicting versions of Xerces and Gnu Jaxp. Dummy is a basic, built-in protocol, so if it is not locatable there is a library conflict.
Thursday, October 4. 2007
Wegmans has come to Harrisburg at last.
I have enjoyed their Williamsport location on occasion, but it is a bit far for me to drive for regular shopping. This store appears somewhat larger than that location, mainly in the Market Cafe section. This section includes a Chinese by-the-pound buffet called the Wokery, prepared foods section with seafood, Italian, and traditional American foods, a sub shop, pizza shop, coffee shop, and a large indoor and outdoor seating area.
Continue reading "Wegmans Harrisburg"
Thursday, September 20. 2007
Getting blank pages from your java.awt.print.Printable implementation? Check for null pointer exceptions. Uncaught null pointer exceptions generated by your implementation of print() method are silently thrown away. I have noticed this behavior on Java build 1.5.0_07-164 on OS X.
Thursday, September 6. 2007
I have been an advocate of RSS ever since I discovered it. RSS allows me to keep up with the news on many topics while losing as little productive time as possible browsing many websites.
Having used many RSS feed readers, I have been consistently disappointed by the lack of synchronization support for read articles and tagged items across computers, as I use many different systems throughout the day. Google Reader has this feature by its nature of being a web application, but oddly for a company specializing in search, it didn't have feed searching, a feature I use constantly. I have switched between RSSOwl and Newsfire, liking the rich client features, continuing to be annoyed by the lack of multi-system sync, but not annoyed enough to write an RSSOwl plug in to do it for me (one of those things I would enjoy doing if I get some free time).
Yesterday Google Reader added feed searching along with other useful improvements and refinements.
Thursday, August 9. 2007
I was getting an error when trying to run ant junit on a project from the command line for a Netbeans 5.5 project. There are many hard to humanly parse solutions out there via Google. The solution that worked for me:
Continue reading "Netbeans 5.5 'ant junit' Not Working from Command Line"
|