简体   繁体   中英

How to deploy Rails app locally from Heroku

I've been asked to make some minor changes to the UI of a Rails web app that is served from Heroku. I've cloned the git rep locally, made some changes, and now I want to test the changes on my phone - without pushing them live. Do I need a local heroku install? I want to preview this on an iPhone if possible, and an Android device would be helpful as well.

I'm obviously new at Heroku and Rails, so any help is appreciated greatly.

thanks in advance

I believe with Heroku you can use a testing server and a production server. So you could push to your testing to make sure everything is good then push to the production if everything is good.

Maybe you are looking for heroku local . https://devcenter.heroku.com/articles/heroku-local

Or you can just rails s -b 0.0.0.0 and in your phone go to http://server-ip:3000 (you don't need Heroku at all).

After you are done with your changes you can push them to heroku with git push heroku master (if you have access from the Heroku dashboard).

Some people are pointing out the option of using heroku local , but I would also like to mention using Heroku Pipelines as a solution.

A pipeline is a group of Heroku apps that share the same codebase. Apps in a pipeline are grouped into “review”, “development”, “staging”, and “production” stages representing different deployment steps in a continuous delivery workflow

So you could have a "staging" stage to which you initially deploy your app to. Test it as much as you'd like, and when you are ready, promote it to "production."

I've been using this method for awhile for a few of my applications, and it works great.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM