Install rails >=1.9.3 on Ubuntu 12.04 (for Redmine) with RVM

Quick reference on installing specific versions of rails on an “older” version of ubuntu without the need of having all packages in the ubuntu repositories.

\curl -L | bash -s stable --ruby
/usr/local/rvm/bin/gem install ... (all needed gems)
/usr/local/rvm/bin/gem install passenger
apt-get install libcurl4-openssl-dev apache2-threaded-dev

The Apache 2 module was successfully installed.

Please edit your Apache configuration file, and add these lines:

   LoadModule passenger_module /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.10/buildout/apache2/
   PassengerRoot /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.10
   PassengerDefaultRuby /usr/bin/ruby1.8

After you restart Apache, you are ready to deploy any number of Ruby on Rails
applications on Apache, without any further Ruby on Rails-specific

After doing so, you can continue to install redmine as described in

/usr/local/rvm/gems/ruby-2.0.0-p247/bin/bundle install --without development test

This will fail if the environment is not set correctly – this helped me a lot:

source /usr/local/rvm/environments/ruby-2.0.0-p247

And finally the last missing gem:

/usr/local/rvm/bin/gem install rake -v=10.1.0

That’s it.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.