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 https://get.rvm.io | 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
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.10/bin/passenger-install-apache2-module

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/mod_passenger.so
   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
configuration!

After doing so, you can continue to install redmine as described in http://www.redmine.org/projects/redmine/wiki/RedmineInstall

/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:
http://stackoverflow.com/questions/12127603/usr-bin-env-ruby-noexec-wrapper-fails-with-no-file-or-directory

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 Reply

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.