0
我很難運行rails runner(在rails 4.2.6版本中)。rails runner引發不正確的錯誤:「config.eager_load設置爲零」
即使在所有環境文件中正確設置此值,以下每個命令都會將錯誤「config.eager_load設置爲零」。
bin/rails runner -e "MyClass.my_method"
bundle exec rails runner =e "MyClass.my_method"
bin/rails runner -e "MyClass.my_method" RAILS_ENV=development
bundle exec rails runner =e "MyClass.my_method" RAILS_ENV=development
RAILS_ENV=development bin/rails runner -e "MyClass.my_method"
RAILS_ENV=development bundle exec rails runner -e "MyClass.my_method"
什麼是運行rails runner的正確方法?
下面是關於運行'runner'的正確方法的文檔:http://guides.rubyonrails.org/command_line.html#rails-runner這意味着它可能是'bin/rails runner -e development「MyClass .my_method「' –
哇。文檔。謝謝。帖子,我會標記爲答案。 – s2t2