Ruby on rails 将带有ActionCable的rails应用程序部署到Heroku

Ruby on rails 将带有ActionCable的rails应用程序部署到Heroku,ruby-on-rails,ruby,heroku,deployment,actioncable,Ruby On Rails,Ruby,Heroku,Deployment,Actioncable,我使用ROR和ActionCable创建了简单的在线聊天。 然后尝试将应用程序部署到heroku 但我在部署后出现了一个奇怪的错误,应用程序无法运行 Heroku生成日志: ......... Bundle completed (0.70s) Cleaning up the bundler cache. Could not detect rake tasks ensure you can run `$ bundle exec rake -P` against you

我使用ROR和ActionCable创建了简单的在线聊天。 然后尝试将应用程序部署到heroku

但我在部署后出现了一个奇怪的错误,应用程序无法运行

Heroku生成日志:

   .........
   Bundle completed (0.70s)
   Cleaning up the bundler cache.
   Could not detect rake tasks
   ensure you can run `$ bundle exec rake -P` against your app with no environment variables present
   and using the production group of your Gemfile.
   rake aborted!
   TypeError: nil is not a symbol
   /tmp/build_5cc20a589923a15d8ef20f9d30e7babf/kokosko-chat-c869529/vendor/bundle/ruby/2.0.0/bundler/gems/actioncable-98855fea634a/lib/action_cable.rb:29:in `module_function'
   /tmp/build_5cc20a589923a15d8ef20f9d30e7babf/kokosko-chat-c869529/vendor/bundle/ruby/2.0.0/bundler/gems/actioncable-98855fea634a/lib/action_cable.rb:29:in `<module:ActionCable>'
   /tmp/build_5cc20a589923a15d8ef20f9d30e7babf/kokosko-chat-c869529/vendor/bundle/ruby/2.0.0/bundler/gems/actioncable-98855fea634a/lib/action_cable.rb:22:in `<top (required)>'
   .........
Gemfile

gem 'actioncable', github: 'rails/actioncable'
在本地机器上,一切正常。 有什么想法吗


来源,如果有帮助的话:

这听起来像是在运行ruby 2.0或更低版本。Rails 5.0需要ruby 2.2

此错误消息的确切原因是在ruby的早期版本中

def foo
end

返回nil,而从ruby 2.1开始,它将返回
:foo
。您发布的代码依赖于此更改。

是的,您是对的!我忘了在Gemfile中设置Ruby版本,Heroku使用旧的2.0.0版本,而不是本地主机上的2.2.2。
def foo
end