Install Rails 4.0 with Ruby 2.0

Get the stable version of rvm:

$ rvm get stable

Install Ruby 2.0

$ rvm install ruby-2.0.0

Create a Gemset;

$ rvm gemset create rails-4.0

Goto that gemset:

$ rvm use ruby-2.0.0-p247@rails-4.0

Install Rails 4.0

$ gem install rails --version=4.0

Create an rvmrc file in root folder:

$ vim rvmrc
$ rvm --rvmrc use ruby-2.0.0-p247@rails-4.0

uncomment the line gem ‘therubyracer’, platforms: :ruby from Gemfile

Start the server:

$ rails s

You are ready to go!!

Changes that you may need to perform while working with Rails 4 compared to old versions:

1. Check here for the New changes in Rails 4
http://net.tutsplus.com/tutorials/ruby/digging-into-rails-4/
http://www.alfajango.com/blog/rails-4-whats-new/
http://www.sitepoint.com/get-your-app-ready-for-rails-4/
2. If you are using devise gem use devise version 3 or above (http://blog.plataformatec.com.br/2013/05/devise-and-rails-4/)

Unknown's avatar

Author: Abhilash

Hi, I’m Abhilash! A seasoned web developer with 15 years of experience specializing in Ruby and Ruby on Rails. Since 2010, I’ve built scalable, robust web applications and worked with frameworks like Angular, Sinatra, Laravel, Node.js, Vue and React. Passionate about clean, maintainable code and continuous learning, I share insights, tutorials, and experiences here. Let’s explore the ever-evolving world of web development together!

2 thoughts on “Install Rails 4.0 with Ruby 2.0”

Leave a comment