在heroku....here is my gemfile...what do I do上,我一直收到此错误
source 'http://rubygems.org'
gem 'rails', '2.3.8'
gem 'will_paginate', '2.3.12'
gem 'googlecharts'
# gem 'faker'
gem 'httparty'
gem 'bandsintown'
gem 'itunes-search-api','0.1.0', :path => 'vendor/gems/itunes-search-api-0.1.0'
gem 'i18n', '0.4.2'
gem "giggly", "~> 0.1.2"
gem "ruby-paypal",'0.0.5', :path => 'vendor/gems/ruby-paypal-0.0.5'
group :production do
gem 'test-unit', "2.3.1"
gem 'pg'
end
group :development, :test do
gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'
end我试着去掉它的gem 'test-unit', "2.3.1",甚至不给它一个特定的版本,我得到了这个错误...
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:84: warning: already initialized constant LN_SUPPORTED
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
rake aborted
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
rake aborted!
can't activate test-unit (= 1.2.3, runtime), already activated test-unit-2.3.1. Make sure all dependencies are added to Gemfile.
/usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/shared_helpers.rb:108:in `block in cripple_rubygems'现在我得到了这个错误
/app/lib/tasks/rspec.rake:1:in `<top (required)>'
test-unit is not part of the bundle. Add it to Gemfile.
/usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/shared_helpers.rb:102:in `block in cripple_rubygems'
/app/lib/tasks/rspec.rake:1:in `<top (required)>'我是如此的confused...on下一步该做什么
发布于 2011-08-11 15:58:16
总结一下:
由于您不使用rspec,因此不需要在rspec rake任务中使用测试单元
发布于 2013-01-17 23:54:13
对我来说,这个错误:
/app/lib/tasks/rspec.rake:1:in `<top (required)>'
test-unit is not part of the bundle. Add it to Gemfile.当我去做一些旧项目的维护工作时,我意外地开始了。这是由rspec rake任务中的以下行触发的:
gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9在返回此应用程序时,默认的Ruby版本已升级到1.9。使用RVM将其设置回1.8 (在我的例子中,在Jruby下)消除了这条消息,并让我在没有消息的情况下恢复到以前的状态。
查尔斯
发布于 2011-08-11 14:00:11
如果您的代码在Bundler运行之前加载了一些gem,并且它恰好加载的版本与Gemfile和Gemfile.lock中指定的版本不同,就会发生这样的错误。当稍后运行Bundler时,它将检测到已加载的gem的错误版本,并引发此错误。解决方案是确保在加载任何其他gem之前运行Bundler.setup。在bundler网站上的Rails 2.3中有关于如何做到这一点的说明,您应该遵循这些说明:
http://gembundler.com/rails23.html
https://stackoverflow.com/questions/7018054
复制相似问题