简体   繁体   中英

`test/dummy/config/application (LoadError)` when using `rails console` in a Rails engine

在使用rails app:update:bin生成binstub之后,Rails 5升级rails console现在会给出错误: test/dummy/config/application (LoadError)

This is because the generated code in bin/rails does not take in to account that RSpec is being used, which uses the spec directory, not test .

To fix open bin/rails and change the APP_PATH to point to the dummy app in the spec directory, ie

APP_PATH = File.expand_path('../../spec/dummy/config/application', __FILE__)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM