TOTD #35: Rails Database Connection on Solaris
Are you deploying your JRuby-on-
(or any variety of Unix) and not able to connect to the database ?
I experienced it last week so thought of sharing the tip here. Luckily
it's really simple.
Here is the default generated "config/database.yml"
The only required change is to add "host: 127.0.01" for the required
database configuration. The updated fragment is shown below (with
Even though "host" is required for TCP connections but the database
connection does not seem to work without this entry. The exact same
application works without "host" entry on Windows and Mac OS.
Alternatively, you can always install the JDBC adapter as href="http://wiki.jruby.org/wiki/Running_Rails_with_ActiveRecord-JDBC">explained