A clean install of Ruby 1.9.1 + Ruby-on-Rails 2.3.2 on Ubuntu 9.04
I think the best way to go about this is to build everything from source. There are a few caveats of course, but I hope to clear them up.
Prerequisites:
sudo apt-get install libncurses5-dev libreadline5-dev mysql-server libmysqlclient15-dev mysql-client libssl-dev sqlite3 libsqlite3-dev
Download the sources for ruby, rubygems, mysql-ruby
OPTIONAL: Add this patch to ruby for a 30% boost with pthreads.
patch -p1 < patch.diff
autoconf
./configure —prefix=
--disable-ucontext --enable-pthread
make; make install
Set ruby(
Edit: remember to set
RUBYLIB to
/lib:$RUBYLIB
Now here’s the interesting step, install readline by
cd
/ext/readline ruby extconf.rb
make;make install
cd
/ext/openssl ruby extconf.rb
make;make install
cd rubygems
ruby setup.rb
make;make install
gems will automatically come onto your path, since it installs to the same directory as ruby (
Time to install gems. But first create a directory, say ”~/GEMS” and set both GEM_HOME and GEM_PATH to it. Also add $GEM_HOME/bin to your $PATH
gem install rubygems-update rails sqlite3-ruby
this should again place rails on your ruby install path
Do a
gem update
to update your gems periodically.
Important Note: if you are using a pre-2.3 Rails app in your 2.3 rails, make sure you rename
app/controllers/application.rb app/controllers/application_controller.rb