3 posts tagged “os x”
After installing Rails (Edge) on OS X, I started getting various errors about 'sqlite3'. So, I decided to do a little research.
It turns out that SQLite3 is the new default (development) database for Rails and is also pre-installed on OS X (>Tiger).
When I tried to install the Ruby bindings, I received:
I found a post that described a fix:
sudo apt-get install sqlite3 libsqlite3-dev
sudo gem install sqlite3-ruby
Of course, this means I have to install apt-get, except that on OS X we use MacPorts.
I don't need sqlite3, so can exclude it.
Well, that didn't work. Apparently, there is no such thing as "libsqlite3-dev" through ports.
I found another post that suggests getting the SQLite3 source code.
Installing Rails is supposed to be easy. (This isn't in the instructions of the video, but I assume I need to actually install Rails at some point!)
sudo gem install rails --include-dependencies --no-rdoc
(I used '--no-rdoc' proactively.)
Successfully installed activesupport-2.0.2
Successfully installed activerecord-2.0.2
Successfully installed actionpack-2.0.2
Successfully installed actionmailer-2.0.2
Successfully installed activeresource-2.0.2
Successfully installed rails-2.0.2
6 gems installed
Installing ri documentation for activesupport-2.0.2...
Installing ri documentation for activerecord-2.0.2...
Installing ri documentation for actionpack-2.0.2...
Installing ri documentation for actionmailer-2.0.2...
Installing ri documentation for activeresource-2.0.2...
Despite the '--no-rdoc', it seems to have installed the documentation. Oh well, no errors.
Ah, but I am running Ruby 1.9 which is not compatible with Rails 2.0.2. Ugh.
Using the latest Rails, Rails worked! (Welcome to life on the Edge.)
Ruby is now an official part of Leopard. Well, it seems more complicated than that. It seems that there are difficulties updating the gems, since the gem system installed by default in Leopard is 0.94 (gem -v) and gems isn't Leopard-aware until 0.95. It is now at 1.0. Lots of workarounds have been suggested.
I'm not going to bother with all that right now. The defaults should be sufficient for my immediate purposes.