【发布时间】:2015-11-18 09:18:41
【问题描述】:
我遇到了应用程序错误,所以检查了heroku rails console:
(master)$ heroku run rails console
Running rails console on morning-river-1349... up, run.8048
/app/vendor/ruby-2.2.3/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'spring' (= 1.1.3) among 58 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/app/vendor/bundle/ruby/2.2.0:/app/vendor/ruby-2.2.3/lib/ruby/gems/2.2.0', execute `gem env` for more information
from /app/vendor/ruby-2.2.3/lib/ruby/2.2.0/rubygems/dependency.rb:324:in `to_spec'
from /app/vendor/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from /app/bin/spring:12:in `<top (required)>'
from /app/bin/rails:4:in `load'
from /app/bin/rails:4:in `<main>'
解决方案:我不得不将 spring 开发部分移到 gemfile 中的 main 部分。
现在应用运行良好,但是,
关于如何防止heroku跳过开发类别宝石的任何想法?
edit :抱歉给您带来不必要的麻烦,我阅读了 rails 4.1 {since then spring is preloaded} 的发行说明,因此将其包含在 gemfile 中会造成不必要的问题,因此将其完全删除。
【问题讨论】:
标签: ruby-on-rails ruby heroku gem