0

I used Jruby version 1.6.5.1 which include Ruby 1.8.7, rails 2.3.12. and gem 1.6.2. How can I upgrade all this versions to higher versions (Jruby 1.7.x, ruby 1.9.x or 2.x and rails 3.x or 4.x)

Thanks in advance.

  • 2
    http://stackoverflow.com/questions/17141363/upgrading-from-rails-2-3-8-to-4-0 Is a good place to start. – Troy SK Dec 18 '15 at 09:05

2 Answers2

1

You can use rvm to manager ruby version

Bellow code lines is use install ruby 1.9.3 on Centos. You can refference it.

curl -L get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh

rvm install 1.9.3

rvm use 1.9.3 --default 
dieuvn3b
  • 5,826
  • 3
  • 17
  • 29
0

this will be a multi-step process and largely depends on the gems you're using. it really helps if you happen to have test coverage, otherwise it might get a little painful.

here's shortly what I would do (did some 2.3 upgrades previously) :

  • upgrade JRuby to latest 1.7.x it defaults to 1.9.3 but using --1.8 makes it 1.8.7 compatible
  • setup Bundler on Rails 2.3 http://bundler.io/v1.11/rails23.html (will help managing the gems)
  • attempt to upgrade to Rails 3.2 (review an empty created app to adjust the environment/*.rb, environment.rb, boot.rb etc. accordingly) - some gems might need an upgrade or replacing
  • switch off the --1.8 switch for JRuby ... you'll be running with 1.9.3
  • (optional) upgrade to Rails 4.x
  • (optional) upgrade to JRuby 9.0.x

*each step assumes running tests or somehow testing out the app is in a working state.

kares
  • 7,076
  • 1
  • 28
  • 38