Environment: Rails 2.3.5 app - redmine,our internal project management tool, in our case - running on Ubuntu 10.04.
Requirement: Install a Rails 3 app - our new corp web site in this case. Goodbye, Wordpress, hello home-grown RoR happiness.
Note: this will down your rails 2.3.5 app briefly.
- Make sure your core libs are up to date:
- apt-get install libyaml-ruby
- apt-get install libzlib-ruby
- Update rubygems. Ubuntu won't let you using "gem install rubygems", so do this instead:
- gem install rubygems-update
- rubygems-update
- Install bundler
- gem install bundler
- Install Rails 3. This will take a few minutes.
- gem install rails
- Go to your Rails 3 app directory and run:
- bundle install
- Reload apache (optional)
- /etc/init.d/apache2 reload OR service apache2 reload
- Your old Rails 2 app will now be down and your new Rails 3 app is running. Now we reinstall Rails 2. Bundler lets these coexist peacefully:
- gem install rails -v=2.3.5
- Reload apache.
- /etc/init.d/apache2 reload OR service apache2 reload
Check your work by accessing both of your applications. Voila!