Install ruby-1.9.2-p290 using RVM and use.
rvm install ruby-1.9.2-p290
rvm use ruby-1.9.2-p290
Create a gemset for Rails 3.1 rc6 and use.
rvm gemset create rails31rc6
rvm gemset use rails31rc6
Install Rails 3.1rc6
gem install rails -v ">=3.1.0rc"
Create a new Rails 3.1rc6 project
# -T is to disable default test framework, no TestUnit.
rails new newproject -T
Setup rvmrc file
cd newproject
rvm --rvmrc use ruby-1.9.2-p290@rails31rc6
Edit Gemfile add this to the bottom.
# this is for Heroku
group :production do
gem 'therubyracer-heroku'
gem 'pg'
end
# dev and test frameworks
group :development, :test do
gem "rspec-rails"
gem "database_cleaner"
gem "rails3-generators"
gem "factory_girl_rails"
gem "capybara"
gem "guard-rspec"
end
Run bundle to install gems
bundle
Initialize RSpec
rails g rspec:install
Install rb-fsevent if needed (optional)
gem install rb-fsevent
Initialize Guard
guard init rspec
Initialize Git
git init
Add remote Git
git remote add origin [url]/newproject.git
First commit
git add .
git commit -m 'my first commit'
First Push
git push origin master
Install Heroku
gem install heroku
Heroku Setup (Enter your credentials when asked)
heroku create
Push to Heroku
git push heroku master
If you have problems with RSA key’s, push your public keys to heroku
heroku keys:add ~/.ssh/id_rsa.pub
You should be good to go.