How can I fix error below "but your Gemfile requires activesupport 3.0.0"
Gem::LoadError - You have already activated activesupport 3.0.3, but your Gemfile requires activesupport 3.0.0
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.2/lib/bundler/runtime.rb:27:in `setup': You have already activated activesupport 3.0.3, but your Gemfile requires activesupport 3.0.0. Consider using bundle exec. (Gem::LoadError)
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.2/lib/bundler/spec_set.rb:12:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.2/lib/bundler/spec_set.rb:12:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.2/lib/bundler/runtime.rb:17:in `setup'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.2/lib/bundler.rb:100:in `setup'
from /home/maiordes/rails_apps/maiordesconto/config/boot.rb:8
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
f开发者_开发技巧rom /home/maiordes/rails_apps/maiordesconto/config/application.rb:1
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/maiordes/rails_apps/maiordesconto/config/environment.rb:2
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/maiordes/rails_apps/maiordesconto/daemons/ticket_handler.rb:6
Like the error says, did you consider using bundle exec
? :)
Run commands through bundle exec
to make sure the versions of Gems that are available are exactly what the Gemfile says are required.
For example:
bundle exec rails ...
bundle exec rake ...
Remove the specific version of the gem in the gemfile, and let the gem name be alone.
精彩评论