Reputation: 13761
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!
Upvotes: 0
Views: 70
Reputation: 6571
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.
Upvotes: 2
Reputation: 47010
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.
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
.
Upvotes: 1
Reputation: 86
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?
Upvotes: 2