这就是我在Heroku日志中看到的内容:
heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 44765`
app[web.1]: bundler: failed to load command: rackup (/app/vendor/bundle/ruby/2.3.0/bin/rackup)
app[web.1]: NameError: uninitialized constant Timeout::Error
app[web.1]: Did you mean? KeyError
app[web.1]: IOError
app[web.1]: Errno
app[web.1]: /app/vendor/ruby-2.3.3/lib/ruby/2.3.0/resolv.rb:164:in `<class:Resolv>'
app[web.1]: /app/vendor/ruby-2.3.3/lib/ruby/2.3.0/resolv.rb:39:in `<top (required)>'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require_with_backports'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/twitter-6.1.0/lib/twitter/streaming/connection.rb:3:in `<top (required)>'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require_with_backports'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/twitter-6.1.0/lib/twitter/streaming/client.rb:5:in `<top (required)>'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require_with_backports'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/twitter-6.1.0/lib/twitter.rb:26:in `<top (required)>'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require_with_backports'
app[web.1]: /app/sixnines.rb:34:in `<top (required)>'
app[web.1]: /app/config.ru:23:in `require_relative'
app[web.1]: /app/config.ru:23:in `block in <main>'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:55:in `instance_eval'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:55:in `initialize'
app[web.1]: /app/config.ru:in `new'
app[web.1]: /app/config.ru:in `<main>'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:49:in `eval'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:49:in `new_from_string'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:40:in `parse_file'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/server.rb:300:in `build_app_and_options_from_config'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/server.rb:209:in `app'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/server.rb:337:in `wrapped_app'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/server.rb:273:in `start'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/server.rb:148:in `start'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/bin/rackup:4:in `<top (required)>'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/bin/rackup:22:in `load'
app[web.1]: /app/vendor/bundle/ruby/2.3.0/bin/rackup:22:in `<top (required)>'
heroku[web.1]: Process exited with status 1
我尝试了所有内容,但却无法理解为什么找不到timeout
。任何提示?这是来源:https://github.com/yegor256/sixnines
答案 0 :(得分:3)
最初,宝石名称为timeout-extensions。 RubyGems允许将其作为timeout发布,原因不明。
因此当Gemfile
中包含timeout
时,它会制作Ruby的本地timeout
模块,该模块定义Timeout::Error
。
因此,Gemfile
中的行应为
gem 'timeout-extensions'
而不是
gem 'timeout'