Say I have two versions of a gem installed (somegem versions 0.10.6 and 0.10.5) and I want to run the earlier version from the commandline. Do I have to uninstall the newer version? Is there a way I can use a flag to specify which version I want to use? Something like...
somegem /path/to/dir --version 0.10.5
I checked the rubygems documentation, and it only describes how to use a specific version when you require a gem from a file, but nothing about how to do it from the commandline.
Use `gem install -v` You may already be familiar with gem install , but if you add the -v flag, you can specify the version of the gem to install. Using -v you can specify an exact version or use version comparators.
The gem command allows you to interact with RubyGems. Ruby 1.9 and newer ships with RubyGems built-in but you may need to upgrade for bug fixes or new features. To upgrade RubyGems, visit the download page. If you want to see how to require files from a gem, skip ahead to What is a gem.
Using gem, the closest I can get is gem list -d [gemname] , which appears to list only the latest version installed.
somegem _0.10.5_ /path/to/dir
No link to documentation, because apparently there isn't any.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With