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
答案 0 :(得分:0)
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.
答案 1 :(得分:0)
也许您正在寻找heroku local
。 https://devcenter.heroku.com/articles/heroku-local
或者您可以rails s -b 0.0.0.0
,然后在手机中转到http://server-ip:3000
(根本不需要Heroku)。
完成更改后,您可以使用git push heroku master
将它们推送到heroku(如果您可以从Heroku仪表板访问)。
答案 2 :(得分:0)
有些人指出使用function CarController($http, $scope) {
console.log(this.foo) // prints: bar
// ....
}
function BMWController($scope, $injector) {
this.foo = "bar";
$injector.invoke(CarController, this, { $scope: $scope });
// ....
}
的选项,但我还想提及使用Heroku Pipelines作为解决方案。
管道是一组共享相同代码库的Heroku应用程序。管道中的应用程序分为“审核”,“开发”,“暂存”和“生产”阶段,代表连续交付工作流程中的不同部署步骤
因此,您可以拥有一个“暂存”阶段,您最初将应用程序部署到该阶段。尽可能多地测试它,当你准备好时,将它推广到“生产”。
对于我的一些应用程序,我已经使用这种方法一段时间了,而且效果很好。