As of the writing of this entry, the stable version of rails is 3.2.9. If you can’t wait to try out the Rails 4.0 version, you can create a new app using the current master branch (Rails 4.0.0.beta).
Rails 4.0 will support only Ruby 1.9.3, make sure you set your RVM with this version.
1. Update your bundler gem.
gem install bundler
2. Clone the Rails source (master branch).
git clone https://github.com/rails/rails.git
3. Create the rails app The —dev option points you Gemfile to your local rails checkout. You can use the —edge option if you want to point the Gemfile to rails on github.
rails/railties/bin/rails new foo --dev
4. Start the app