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=<release>--disable-ucontext --enable-pthread

make; make install

Set ruby(<release>/bin) onto your path.

Edit: remember to set

RUBYLIB to <release>/lib:$RUBYLIB

Now here’s the interesting step, install readline by

cd <src dir>/ext/readline

ruby extconf.rb

make;make install

cd <src dir>/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 (<release>/bin) above.

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

One Comment

  1. In case you are using mysql – you need to download an build mysql-ruby yourself. To use PostGres, just do “gem install pg”.

    In case you are using smtp_tls, you need to download the source (http://github.com/seattlerb/smtp_tls/tree/master) and build the gem (http://dev.nuclearrooster.com/?p=24) by first removing the Ruby version check in the Rakefile.


Post a Comment

*
*