Two steps:
1. Install sqlite3 on your mac
2. Install the sqlite gem
Step 1:
On Mac OS X Leopard - no worries. It’s already installed and working great!
On Mac OS X Tiger - be careful. It is technically already installed, but you might have problems with migrations still.
If you are having problems, you need to do the following:
A. sudo gem uninstall sqlite3-ruby
B. run the following commands in your terminal command line
curl -O http://www.sqlite.org/sqlite-3.5.9.tar.gz $ tar xzf sqlite-3.5.9.tar.gz $ cd sqlite-3.5.9 $ ./configure --prefix=/usr/local $ make $ sudo make install
(Thanks to Accidental Technologist.)
Step 2:
run ’sudo gem install sqlite3-ruby’ in your terminal.
———-
Miscellaneous comments as I was trying to figure this out. These really are not all that useful.
RailsWiki instructions for sqlite3
HOWEVER, you might still get this error like I did. Also here.
Unfortunately, those forum links did not help.
And thank you mislav for instructions on how to get it going. Never mind. Not helpful to Tiger users.
Thanks man. That was very helpful.
Thanks for the notes on this. I have also been having real problems in this area. I installed the whole ruby-gem-rails toolset and don’t seem to be able to get sqlite3 going. I installed v3.5.9 of sqlite3-ruby but still get this kind of message when doing a migration:
morse:/Users/Shared/software/addressbook rubyrails$ rake db:migrate
(in /Users/Shared/software/addressbook)
rake aborted!
no such file to load — sqlite3/database
This is on a Mac OS X Server box btw. I think I may have to resort to MySQL.
Hi Ian. I’m not sure what could still be the problem. I’ve never dealt with OS X Server.
Did you first uninstall the sqlite3-ruby gem via sudo gem uninstall sqlite3-ruby?
Then after doing the curl, and make, and sudo make, did you then reinstall the sqlite3-ruby gem by doing sudo gem install sqlite3?
What happens when you type ****sqlite3**** into your terminal?
Thanks alot, I kept looking for a binary install, but as always, its just easier to compile. DOH!!!