How do I deactivate a specific version of gem?
Currently I have two versions of rack installed on my computer 1.0.1 and 1.2.1 However, when I tried to push my git to Heroku, it complains
You have already activated rack 1.0.1, but your Gemfile requires rack 1.2.1. Consider using bundle exec. (Gem::LoadError)
How can I deactivate rack 1.0.1 and activate 1.2.1 instead? (I can't uninstall 1.0.1 since it'开发者_如何学JAVAs under system folder and I don't have the root password)
gem list -d rack
*** LOCAL GEMS ***
rack (1.2.1, 1.0.1)
Author: Christian Neukirchen
Rubyforge: http://rubyforge.org/projects/rack
Homepage: http://rack.rubyforge.org
Installed at (1.2.1): /Library/Ruby/Gems/1.8
(1.0.1): /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
a modular Ruby webserver interface
And this is my Gemfile
source 'http://rubygems.org'
gem 'rails', '3.0.1'
gem 'sqlite3-ruby', '1.2.5'
gem 'hpricot'
gem 'gravatar_image_tag', '0.1.0'
gem 'devise', '1.1.3'
gem 'omniauth'
gem 'fb_graph'
gem 'rack', '1.2.1'
gem 'annotate-models'
gem 'webrat'
gem 'faker', '0.3.1'
gem 'will_paginate', '3.0.pre2'
You are probably using the Aspen stack, and will need to switch to Bamboo to accomplish what you're trying to do.
http://docs.heroku.com/stack
精彩评论