Ruby: How to install a specific version of a ruby gem?
Use the -v
flag:
$ gem install fog -v 1.8
How to run a specific version of a ruby gem
I can't reproduce this issue, but I can think of a few reasons why this might happen:
- Bundler artifacts (perhaps in
.bundle/
) pointing to the old version. Try running in a different directory and see if it still happens - A bug in RubyGems (try
gem update --system
) - During install, it asked if you wanted to replace the
brakeman
binary and you selected "no" - If you are using a Ruby version manager, maybe one version is on a different path than another (like a system gem versus one managed by
rvm
) - Any number of
GEM_PATH
,bundler
,gem
,rvm
weirdness that sometimes occurs
In any case, if I were you I'd gem uninstall brakeman
, remove all versions, and install fresh. If you are using rvm
, start with a fresh gemset or rvm gemset empty
the current one.
Related Topics
Ruby: Easiest Way to Filter Hash Keys
How to Do Static Content in Rails
Rails.Cache Error in Rails 3.1 - Typeerror: Can't Dump Hash With Default Proc
How to Install Rvm on Windows 7
How to Assign Hash['A']['B']= 'C' If Hash['A'] Doesn't Exist
Why Isn't Self Always Needed in Ruby/Rails/Activerecord
Fibonacci Sequence in Ruby (Recursion)
How to Use Define_Method to Create Class Methods
Nokogiri Gem Installation Error
Eoferror: End of File Reached Issue With Net::Http
To Use Self. or Not.. in Rails
Ruby/Rails - Change the Timezone of a Time, Without Changing the Value
Why Should We Avoid Using Class Variables @@ in Rails
Rails: Skinny Controller Vs. Fat Model, or Should I Make My Controller Anorexic
How to "Activate" a Different Version of a Particular Gem
Gem Install Permission Problem