Geoku文件更改后,Heroku Rails应用程序无法正常工作

时间:2017-06-08 00:12:08

标签: ruby-on-rails ruby heroku

所以我删除了braintree gem并在我的网络应用上添加了条纹gem,方法是删除gem 'braintree'并将gem 'stripe'添加到我的Gemfile中。

我忘记在bundle install之前运行git push

推动失败了,说

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.2.4
-----> Installing dependencies using bundler 1.13.7
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
       The git source `git://github.com/rails/activeresource.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
       You are trying to install in deployment mode after changing
       your Gemfile. Run `bundle install` elsewhere and add the
       updated Gemfile.lock to version control.
       You have added to the Gemfile:
       * stripe
       You have deleted from the Gemfile:
       * braintree (~> 2.68.2)
       Bundler Output: The git source `git://github.com/rails/activeresource.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
       You are trying to install in deployment mode after changing
       your Gemfile. Run `bundle install` elsewhere and add the
       updated Gemfile.lock to version control.

       You have added to the Gemfile:
       * stripe

       You have deleted from the Gemfile:
       * braintree (~> 2.68.2)
 !
 !     Failed to install gems via Bundler.
 !
 !     Push rejected, failed to compile Ruby app.
 !     Push failed

当我查看我推送的内容时,它显示我只更改了Gemfile,而不是Gemfile.lock

我当时并没有真正想到,所以我运行了heroku运行捆绑安装但它仍然没有工作......然后我意识到我需要在我的开发服务器上运行bundle install,git add ,提交和推动。我做到了,部署成功了。

我应该做的,然后检查Heroku以查看应用程序是否有效,但我继续我的开发环境。 3周后,我现在陷入困境,无法使我的生产服务器正常工作,因此无法帮助它。之所以如此,是因为如果我在更改宝石之前恢复部署,Heroku应用程序就可以工作。如果我在更换宝石后恢复到第一次成功的Heroku部署,它就无法工作。

最重要的是,它正在开发中,但Heroku只给我状态= 500只用于HomeController中的任何东西。我的ProductController和SessionsController在Heroku中运行得很好。有人请帮帮我。

编辑:更多日志

2017-06-08T00:19:46.287414+00:00 app[web.1]: [4] * Min threads: 5, max threads: 5
2017-06-08T00:19:46.287414+00:00 app[web.1]: [4] * Environment: production
2017-06-08T00:19:46.287415+00:00 app[web.1]: [4] * Process workers: 2
2017-06-08T00:19:46.287416+00:00 app[web.1]: [4] * Preloading application
2017-06-08T00:19:48.376028+00:00 app[web.1]: [4] * Listening on tcp://0.0.0.0:37753
2017-06-08T00:19:48.376189+00:00 app[web.1]: [4] Use Ctrl-C to stop
2017-06-08T00:19:48.380496+00:00 app[web.1]: [4] - Worker 0 (pid: 6) booted, phase: 0
2017-06-08T00:19:48.381809+00:00 app[web.1]: [4] - Worker 1 (pid: 10) booted, phase: 0
2017-06-08T00:19:48.805034+00:00 heroku[web.1]: State changed from starting to up
2017-06-08T00:19:50.934188+00:00 heroku[router]: at=info method=GET path="/" host=apparelpop.herokuapp.com request_id=1c750af7-6e1b-47a8-b53a-173363734cee fwd="71.84.13.91" dyno=web.1 connect=1ms service=643ms status=500 bytes=1669 protocol=https
2017-06-08T00:19:51.311080+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=apparelpop.herokuapp.com request_id=1e2ec266-b53f-46c6-96bf-fff047495344 fwd="71.84.13.91" dyno=web.1 connect=0ms service=1ms status=200 bytes=4432 protocol=https
2017-06-08T00:30:40.856024+00:00 heroku[router]: at=info method=GET path="/add_products" host=apparelpop.herokuapp.com request_id=67922ed5-7b11-4c9d-bc4c-9c004ffae29b fwd="71.84.13.91" dyno=web.1 connect=1ms service=252ms status=200 bytes=3426 protocol=https
2017-06-08T00:30:41.011843+00:00 heroku[router]: at=info method=GET path="/assets/application-eabf6168a4491b0270f9a3592275b1703fc9822f8dbe89d4d48747bf988ee588.css" host=apparelpop.herokuapp.com request_id=74c2f89f-192c-4521-9e94-044eee61f28b fwd="71.84.13.91" dyno=web.1 connect=1ms service=6ms status=200 bytes=21759 protocol=https
2017-06-08T00:30:41.003143+00:00 heroku[router]: at=info method=GET path="/assets/application-bbc24c0db3a1883d36ac5d3c7633860a208f9b559914a4de7f46dd9718df230c.js" host=apparelpop.herokuapp.com request_id=c2139621-68ff-441f-808f-3044d75c0a6d fwd="71.84.13.91" dyno=web.1 connect=1ms service=3ms status=200 bytes=44113 protocol=https
2017-06-08T00:30:45.499471+00:00 heroku[router]: at=info method=GET path="/invoices" host=apparelpop.herokuapp.com request_id=6c72f5ef-6c83-482e-b362-2bd8580b4593 fwd="71.84.13.91" dyno=web.1 connect=1ms service=1085ms status=500 bytes=1669 protocol=https

0 个答案:

没有答案