uninitialized constant Rails::Command::Actions::APP_PATH (NameError) when trying to start Rails engine server

为君一笑 提交于 2019-12-13 17:23:50

问题


The full error is

~/.gem/ruby/2.4.0/gems/railties-5.1.5/lib/rails/command/actions.rb:8:in `set_application_directory!': uninitialized constant Rails::Command::Actions::APP_PATH (NameError)

I recently upgrade from Rails 4.x to 5.x.


回答1:


You need to generate (or regenerate) "binstubs" for the dummy application.

cd spec/dummy
bundle exec rails app:update:bin

You should now be able to start the dummy application, from the spec/dummy directory, as such:

bundle exec bin/rails server

The spec/dummy/script directory can also be deleted.



来源:https://stackoverflow.com/questions/49627510/uninitialized-constant-railscommandactionsapp-path-nameerror-when-trying

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!