2

我一直在尝试使用此处找到的教程来实现react_on_rails gem 。

不同之处在于我使用的是 ruby​​ 2.3.3,节点 7.2.0,并使用 redux ( rails generate react_on_rails:install --redux)运行设置

但是现在当我尝试运行工头时,foreman run -f Procfile.dev我收到以下错误:

/Users/ryanking/.rvm/gems/ruby-2.3.3/gems/thor-0.19.3/lib/thor/base.rb:534:in `thor_reserved_word?': "run" is a Thor reserved word and cannot be defined as command (RuntimeError)
    from /Users/ryanking/.rvm/gems/ruby-2.3.3/gems/thor-0.19.3/lib/thor/base.rb:597:in `method_added'
    from /Users/ryanking/.rvm/gems/ruby-2.3.3/gems/foreman-0.82.0/lib/foreman/cli.rb:80:in `<class:CLI>'
    from /Users/ryanking/.rvm/gems/ruby-2.3.3/gems/foreman-0.82.0/lib/foreman/cli.rb:11:in `<top (required)>'
    from /Users/ryanking/.rvm/gems/ruby-2.3.3/gems/foreman-0.82.0/bin/foreman:5:in `require'
    from /Users/ryanking/.rvm/gems/ruby-2.3.3/gems/foreman-0.82.0/bin/foreman:5:in `<top (required)>'
    from /Users/ryanking/.rvm/gems/ruby-2.3.3/bin/foreman:22:in `load'
    from /Users/ryanking/.rvm/gems/ruby-2.3.3/bin/foreman:22:in `<main>'
    from /Users/ryanking/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `eval'
    from /Users/ryanking/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `<main>'

知道为什么会发生这种情况以及如何解决吗?


Procfile.dev 包含:

web: rails s -p 3000
client: sh -c 'rm app/assets/webpack/* || true && cd client && npm run build:development'

我可以从命令行正常运行,但不能使用工头。

4

1 回答 1

3

这是一个错误

从 thor-0.19.1 升级到 thor-0.19.2 后

于 2016-11-27T08:17:10.407 回答