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!

3 Answers 3

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.

Sign up to request clarification or add additional context in comments.

Comments

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?

Comments

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.