Upgrade to rails 4 and ruby 2.0
To upgrade your rails version to rails 4 is pretty easy just follow the below steps.
- I assume you have already rails installed in your system and also you are using rvm and ruby.
- If you are not using rvm i recomend you to use rvm. please check the link for rvm (http://rvm.io/)
open a terminal and follow the steps.
rvm get head (to get the latest version of rvm)
rvm install 2.0.0 (to install ruby)
rvm use 2.0.0
rvm gemset create rails4
gem install rails
Thats it to upgrade your rails version to rails 4 and ruby 2 in ubantu 12.04. Now if you run rails new new_app it will automatically create your rails application in rails 4 simple
Further if you want to use both rails 3 and and rails 4 you can create a .rvmrc file in your application and mention the gem set in that file.
echo "rvm ruby-1.8.7-p352@gemset" > .rvmrc
And inside the file mentioned your gem set. like
rvm use 2.0.0 rvm gemset use rails4
Posted on August 5, 2013, in Ruby On Rails and tagged mindfiresolutions, Rails 3 to Rails 4, rails at mindfiresolutions, RVM, Upgrade rails version, Upgrade to rails 4, Upgrade to ruby 2, Using rails 4, using rvm for upgradation. Bookmark the permalink. 1 Comment.