Rails 2.3 Upgrade Tips 4

Posted by Ben Reubenstein Mon, 16 Mar 2009 16:53:00 GMT

Today Rails 2.3 was pushed. Upgrading some applications created a couple of issues.
NameError (uninitialized constant ApplicationController)

In previous versions of Rails, the generator would create application.rb for the Application Controller. In 2.3 the file is now properly named application_controller.rb.

NameError (uninitialized constant ActionController::Caching::Sweeper)

This is a bug that is part of the 2.3 release. The fix is was supposedly resolved according to this ticket previous to 2.3 but something is still off.

RHEL5 Getting The Rails Console Working 2

Posted by Ben Reubenstein Tue, 10 Feb 2009 16:42:00 GMT

If you compile Ruby from scratch you may get this error when starting a script/console session:

`require': no such file to load -- readline (LoadError)

To solve this you need to install the readline ruby extension. Here I assume you are using the 1.8.7 Ruby.

sudo yum install ncurses-devel readline-devel
cd ~
mkdir src
cd src
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.gz
tar zxvf ruby-1.8.7-p72.tar.gz
cd ruby-1.8.7-p72.tar.gz/ext/readline
ruby extconf.rb
make
sudo make install