Wednesday February 13, 2008
TOTD #26: Overriding Database Defaults in Rails 2.0.2
A Rails 2.0.2 application configures SQLite3 database by default. This requires you to have SQLlite3 database running and also have the corresponding database adapter installed. Even this is part of the Leopard (Mac OS 10.5+) development kit but this needs extra configuration on non-Leopard machines.
One of the guiding principles of Rails is Convention-over-Configuration. So there are couple of ways you can override this default:
jruby -S rails -d mysql myappconfig/environment.rb"
and adding the line:config.frameworks -= [ :active_record ]environment.rb"
and remove other frameworks from inside the parentheses.Please leave suggestions on other TOTD that you'd like to see. A complete archive is available here.
Posted by Arun Gupta in web2.0 | Comments[5]
|
|
|
|
|
Today's Page Hits: 335
Total # blog entries: 1002