Advertisement
Guest User

Untitled

a guest
Jan 25th, 2015
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. My notes on creating a Rails 4.2 app for hosting on Heroku. With RSpec and Postgresql.
  2.  
  3. # Install RVM, Ruby and Bundler
  4. ...
  5.  
  6. # Install Rails
  7. gem install rails --no-ri --no-rdoc
  8.  
  9. # Create new app without Test::Unit, and for Postgresql (for Heroku)
  10. rails new MYAPP --skip-test-unit --database=postgresql
  11.  
  12. # add back `sqlite gem for local dev
  13. gem 'sqlite'
  14. # add rspec to Gemfile:
  15. gem 'rspec-rails'
  16.  
  17. bundle install
  18. rails g rspec:install
  19.  
  20. # create heroku app
  21. heroku apps:create MYAPP
  22.  
  23. # add heroku Postgresql database
  24. heroku addons:add heroku-postgresql:hobby-dev
  25. # for documentation: `heroku addons:docs heroku-postgresql`
  26.  
  27. # push to Heroku
  28. git push heroku master
  29.  
  30. # rake db:migrate
  31. heroku run rake db:migrate
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement