0

I have two questions about general usage with Heroku and RoR:

1) after I deploy my application onto Heroku, how can I apply new changes that I make?

2) After I deploy my application to Heroku, how do I "turn off" the server so that I can run my app locally again via localhost:3000? (for development & testing purposes)

Thanks!

Trung Tran
  • 13,141
  • 42
  • 113
  • 200

3 Answers3

2

Hope this link helps for part 1. Should be able to commit and push your changes using git push heroku master.

https://devcenter.heroku.com/articles/git#tracking-your-app-in-git

For part 2: will scaling your dynos back to 0 work for your case?

How to stop an app on Heroku?

Community
  • 1
  • 1
typicalk
  • 86
  • 5
2

Assuming you are using git to manage your project, you apply changes to Heroku by pushing them. This might look something like this:

git push heroku master

This pushes the master branch of your git project to Heroku.

To "turn off" your app on Heroku, you can do two things:

$ heroku ps:scale web=0

This completely turns off the application. You can also put it in maintenance mode, which simply prevents traffic to it:

$ heroku maintenance:on

That said, you don't need to turn off your app on Heroku while developing locally. The two environments are completely independent of each other.

Ege Ersoz
  • 6,461
  • 8
  • 34
  • 53
1
  1. When you make a change, just push the git repository to heroku again withgit push heroku master. The server will automatically restart with the changed system.

  2. You seem to have a misconception. You can always run your local development server regardless of what Heroku is doing (unless some other service your app connects to would become confused, of course; but if that happens, there is probably something wrong with your design). Nonetheless, if you want to stop the application on Heroku, just scale it to zero web dynos: heroku ps:scale web=0.

Gene
  • 46,253
  • 4
  • 58
  • 96