我有一个应用程序错误,所以检查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>'
Run Code Online (Sandbox Code Playgroud)
解决方案:我必须将spring开发部分移动到gemfile中的main.
现在该应用程序运行良好但是,有关如何防止heroku跳过开发类别宝石的任何想法?
编辑:抱歉不必要的麻烦,我读了rails 4.1的发布说明{从那时起spring被预加载},因此包含在gemfile中导致了不必要的问题,只是完全删除了它.