我一直在尝试实现 react_on_rails gem使用教程发现here .
不同之处在于我使用的是 ruby 2.3.3、node 7.2.0,并使用 redux 运行设置(railsgeneratereact_on_rails:install --redux
)
但是现在当我尝试运行 foreman 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'
我可以从命令行正常运行,但不能通过工头运行。
最佳答案
这是一个bug
After upgrading to thor-0.19.2 from thor-0.19.1
关于ruby-on-rails - React on Rails Gem - 工头雷神冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40826352/