I keep getting this error on 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
I tried taking it gem 'test-unit', "2.3.1"
out and even leaving it without a specific version and I got this error...
/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'
Now I am getting this error
/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)>'
I am so confused...on what to do next
To sum up:
no need of test-unit in production
remove the rspec rake task since you don't use rspec
For me, this error:
/app/lib/tasks/rspec.rake:1:in `<top (required)>'
test-unit is not part of the bundle. Add it to Gemfile.
started unexpectedly when I went to do some maintenance work on an old project. This was triggered by this line in the rspec rake task:
gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
In returning to this application, the default Ruby version was upgraded to 1.9. Using RVM to set this back to 1.8 (in my case under Jruby) eliminated this message and got me back going as before without the message.
Charles
An error like this can occur if your code loads some gems before Bundler is run and it happens to load a different version than is specified in Gemfile and Gemfile.lock. When Bundler is run later, it will detect that the wrong version of a gem has been loaded and raise this error. The solution is to make sure the Bundler.setup runs before any other gems are loaded. There are instructions on how to do this in Rails 2.3 on the bundler website, which you should follow:
http://gembundler.com/rails23.html
精彩评论