Advertisement
xrxrxr

rails heroku

Jun 9th, 2019
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1.  
  2.  
  3. rvm use 2.5.1
  4.  
  5. rails new my_first_app
  6.  
  7. rails new -d postgresql nomdetasuperappli
  8.  
  9. rails generate devise:install
  10.  
  11. rails generate controller static_pages home
  12.  
  13. rails g mailer UserMailer
  14.  
  15. rails g rspec:install
  16.  
  17. rails db:drop
  18.  
  19. rails db:create
  20.  
  21. rails g controller Post index
  22.  
  23. rails db:migrate
  24. a
  25. rails db:seed
  26.  
  27. rails c
  28.  
  29. rails s
  30.  
  31.  
  32. http://localhost:3000/
  33. rails generate model Article ArticleID:integer userID:integer articleContent:string
  34.  
  35.  
  36. rails generate factory_bot:model TonModel
  37.  
  38.  
  39. u = User.create
  40.  
  41. https://rubyplus.com/articles/3451-Has-Many-Through-and-Has-and-Belongs-to-Many-in-Rails-5
  42.  
  43.  
  44.  
  45. https://gossip-projecto.herokuapp.com/ | https://git.heroku.com/gossip-projecto.git
  46.  
  47.  
  48. memo HEROKU
  49.  
  50.  
  51. $ rails new myapp
  52. $ cd myapp
  53. $ heroku create un-nom-trop-cool
  54. #Je change le Gemfile pour la BDD si je suis en SQLite3
  55. $ bundle install
  56. $ rake assets:precompile
  57. $ git add .
  58. $ git commit -m "First commit and pushing to Heroku"
  59. $ git push heroku master
  60. $ heroku run rails db:migrate #optionnel si tu as une migration à migrer
  61. heroku buildpacks:set https://github.com/bundler/heroku-buildpack-bundler2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement