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

stargwq · August 04, 2021 · Last by redemption replied at August 04, 2021 · 266 hits

我的 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 closed this topic. 06 Aug 09:47
You need to Sign in before reply, if you don't have an account, please Sign up first.