Updating to Rails 1.1.1 on OS X
At long last, Rails 1.1.1 is available for download. This is a great release with lots of bugfixes, new features, and optimizations. And my friend Mike Clark has the goods on the Forgotten Features, as well.
But, if you’re upgrading rather than doing a fresh install (as detailed in my tutorial, for example), there’s are two steps you’ll need to take to make sure that things go smoothly.
Note: These are Mac OS X specific instructions, and they assume that you’ve already gone through my tutorial on installing Ruby on Rails on OS X. They’ll probably work just fine on other UNIX systems, too.
1. Update Rails
This is as easy as typing the following into Terminal.app:
sudo gem install rails --include-dependencies
Enter your password when prompted.
2. Update to LightTPD 1.4.11
We need to update LightTPD to version 1.4.11. You can check the current version by typing the following command into Terminal.app:
If you see anything less than 1.4.11, you’ll need to upgrade. Fortunately, it’s easy to do. If you’d like, you can create a
src folder to contain the file you’re about to download, or you can build it right on your Desktop, as follows. Open Terminal.app, and type:
cd Desktop curl -O http://lighttpd.net/download/lighttpd-1.4.11.tar.gz tar xzvf lighttpd-1.4.11.tar.gz cd lighttpd-1.4.11 ./configure --prefix=/usr/local --with-pcre=/usr/local make sudo make install
You can then drag both the
lighttpd-1.4.11.tar.gz file and the
lighttpd-1.4.11 folder into the trash. You’re done with them.
The next time you fire up a Rails app, it’ll use the new LightTPD you just built.
3. Remove the old, Rails-Generated LightTPD Config File
Each time you run
script/server to launch your app, Rails creates a
lighttpd.conf file in the
config folder. Older versions of this file are incompatible with LightTPD 1.4.11.
Fortunately, fixing this problem is as simple as deleting the old file. Rails will automatically create a new one for you the next time you start up
script/server. So just delete the old file in Terminal.app.
cd /path/to/my/rails/app rm config/lighttpd.conf
Of course you’ll want to replace
/path/to/my/rails/app with the actual path to your rails app (I keep mine in
work/appname in my home folder).
Alternatively, you could browse to the file in the Finder and drag it to the Trash.
That’s it. You’re ready for Rails 1.1!