Solutions Log

So I only have to figure things out once.

Using SQLite With Rails

After watching the RESTful Rails PeepCode presentation, I had to try using SQLite for development. That’s nice to not have to set up a database for every little thing you want to play with.

SQLite 3 is already installed on OS X. To get it to work with Rails:

$ sudo port install swig
$ sudo gem install sqlite3-ruby

That will bring up a prompt to choose a gem. Choose the highest version number that says (ruby) after it.

Then you can do things like this in your database.yml:

development:
  adapter: sqlite3
  database: db/development.sqlite3

Source: Rails wiki

Comments