4
我在某個點重新生成了我的binstubs。它曾經是Spring
完美無缺地工作,並在我第一次提出了一個Rails控制檯後,控制檯會立即出現。如何恢復我的Rails 4 binstubs?
現在看來Spring已經不在運行了。
當我鍵入:
rails console
我得到:
Looks like your app's ./bin/rails is a stub that was generated by Bundler.
In Rails 4, your app's bin/ directory contains executables that are versioned
like any other source code, rather than stubs that are generated on demand.
Here's how to upgrade:
bundle config --delete bin # Turn off Bundler's stub generator
rake rails:update:bin # Use the new Rails 4 executables
git add bin # Add bin/ to source control
You may need to remove bin/ from your .gitignore as well.
When you install a gem whose executable you want to use in your app,
generate it and add it to source control:
bundle binstubs some-gem-name
git add bin/new-executable
Loading development environment (Rails 4.2.3)
[1] pry(main)>
如果鍵入:
spring rails console
我得到了同樣的信息,但不是控制檯來了我只是返回到命令行。
我怎樣才能得到這個命令在新的Rails應用程序中的工作方式?