我无法在Heroku上查看正在运行的应用程序。我收到了标准Application Error
屏幕 -
应用程序中发生错误,无法提供您的页面。如果您是应用程序所有者,请检查日志以获取详细信息。
Heroku Logs:
2018-06-05T10:50:18.031804+00:00 heroku[web.1]: State changed from starting to crashed
2018-06-05T10:50:22.184406+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=m-k-blog.herokuapp.com request_id=8ba945a9-49a0-4e08-8ec9-2103dd7b207a fwd="174.109.209.147" dyno= connect= service= status=503 bytes= protocol=https
2018-06-05T10:50:25.677788+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=m-k-blog.herokuapp.com request_id=65b41c1d-87a7-40d8-8b09-32c39fb9a4fc fwd="174.109.209.147" dyno= connect= service= status=503 bytes= protocol=https
2018-06-05T10:50:26.459018+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=m-k-blog.herokuapp.com request_id=a660a55b-d00a-477d-8a2b-7b0b7093410e fwd="174.109.209.147" dyno= connect= service= status=503 bytes= protocol=https
我的proc文件目前包含:
web: bundle exec rackup config.ru -p $PORT -E $RACK_ENV
我将其更改为以下内容以查看会发生什么,并且应用程序错误仍然存在:
web: bundle exec rails server -p $PORT
我认为问题在于它没有获得正确的端口,但我无法在SO上找到适合的解决方案。
更新(上午7:10):
当我运行heroku run rails console
时,我会收到以下日志:
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:124:in `block (2 levels) in <class:Numeric>': stack level too deep (SystemStackError)
from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
... 8070 levels...
from /app/vendor/bundle/ruby/2.4.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /app/vendor/bundle/ruby/2.4.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
from /app/bin/rails:9:in `require'
from /app/bin/rails:9:in `<main>'
更新(上午7:17):
我在Heroku上尝试了Restarting all Dynos
,但它没有用。
答案 0 :(得分:3)
Fixnum
&amp; Bignum
现已弃用&amp;应该使用Integer
来代替Ruby 2.4
。我也发现您使用的rails 4.2.5
与Ruby 2.4
不兼容。
您需要将rails版本升级到至少
Rails 4.2.8
。
价: