我做 git push heroku master 时没有错误。但是在打开heroku时我得到了应用程序错误。所以我检查了heroku日志,唯一突出的是:
2013-04-03T08:03:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.11/lib/active_support/dependencies.rb:317:in
`rescue in depend_on': No such file to load -- spec_helper (LoadError)
所以我猜这就是问题所在。这是否意味着它找不到我的 spec_helper.rb 文件?它在规范文件夹中。
在 rails g rspec:install 我得到:
identical .rspec
exist spec
identical spec/spec_helper.rb
宝石文件:
source 'https://rubygems.org'
gem 'rails', '3.2.11'
gem 'bootstrap-sass', '2.0.4'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.0.1'
gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate', '0.0.6'
gem 'jquery-rails', '2.0.2'
gem 'pg', '0.12.2'
gem 'rails_autolink', '~> 1.0.9'
gem 'rinku', '~> 1.5.0', :require => 'rails_rinku'
gem 'auto_html', '1.6.0'
gem 'acts_as_votable', '~> 0.4.0'
gem 'thumbs_up', '~> 0.6.2'
gem 'thin'
gem 'rmagick'
gem "paperclip", "~> 3.0"
gem 'nifty-generators'
gem 'fancybox-rails'
group :development, :test do
gem 'rspec-rails', '2.11.0'
end
group :development do
gem 'annotate', '2.5.0'
end
group :assets do
gem 'sass-rails', '3.2.5'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
end
group :test do
gem 'factory_girl_rails', '4.1.0'
gem 'capybara', '1.1.2'
gem 'cucumber-rails', '1.2.1', :require => false
gem 'database_cleaner', '0.7.0'
end
非常感谢任何帮助,谢谢。开始认为我的源代码中某处有某种错字,打算尝试卸载 rspec。