Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. ## Setup notes: Rails + React + Postgres on Heroku
  2.  
  3. ```bash
  4. $ rails new <app name> --database=postgresql --webpack=react
  5. $ echo '.idea' >> .gitignore # remove RubyMine's config
  6. $ echo "ruby '2.4.0'" >> Gemfile # for Heroku Ruby version
  7. $ git add .
  8. $ git commit -m "Initial commit"
  9.  
  10. # Create new repo on GitHub with same name...
  11. $ git remote add origin git@github.com:BrianSigafoos/<app name>.git
  12. $ git push -u origin master
  13.  
  14. # Heroku setup
  15. $ heroku create
  16. $ git push heroku master
  17.  
  18. # Heroku helpers
  19. $ heroku run rails console
  20. $ heroku run rake db:migrate # or any rake task
  21.  
  22. # Use secrets.yml.enc - encoded secrets file committed to git
  23. $ bin/rails secrets:setup
  24. # save the encryption key (in git ignored secrets.yml) in a pw manager
  25. $ heroku config:set RAILS_MASTER_KEY=[encryption key]
  26. # check keys
  27. $ heroku config
  28.  
  29. # push local branch to Heroku master
  30. $ git push heroku localbranch:master
  31. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement