新手问题 rails 6.1.3.1 spring 没有在生产还境下跳过

stargwq · 2021年08月04日 · 最后由 redemption 回复于 2021年08月04日 · 236 次阅读

我的 gem 'spring' 是在 development 下,

bundle install --without development test

当我跑

bin/rails c -e production

就会报以下错误

.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'spring' (= 2.1.1) among 143 total gem(s) (Gem::MissingSpecError)

请教各位小伙伴一下,thx


https://stackoverflow.com/questions/30302021/rails-runner-without-spring

This happens because you are using the spring gem and your bin folder has been "springified".

If you take a look in the bin/rails file you will see that spring is loaded before moving on with running whatever you requested from it.
stargwq 关闭了讨论。 08月06日 09:47
需要 登录 后方可回复, 如果你还没有账号请 注册新账号