How can I delete the second path (/home/tom/.gem/ruby/1.8
) of GEM PATHS:
?
Here's the output of $ gem env
:
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.8
- /home/tom/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org/
I appreciate the help!
Just right click on a gem to pull it back out. You can remove them, put them in any other slot of that color. There are serveral video guides on youtube about nearly anything that new players may be asking questions about. This is a short video in my Path of Exile series that explains the skill and gem system.
There are several ways to specify gem versions: Use a specific version: gem "name-of-gem", "1.0" . You can find specific versions on Rubygems.org (provided that's the source you”re using) by searching for your gem and looking at the “Versions” listed. Use a version operator: gem "name-of-gem", ">1.0" .
Override in your ~/.bashrc file?
#in ~/.bashrc
export GEM_PATH=/usr/lib/ruby/gems/1.8
Feels kind of hacky though.
You can’t! I also wanted to do it, and haven’t found a way. Then I looked for in RubyGems source (at github.com) and learned that it tries to get the path from etc/gemrc
and ~/.gemrc
. If it fails (and fails GEM_PATH
environment variable too), it assumes ~/.gem
to be the default path.
Therefore, Max William is right, and you have either to export GEM_PATH
or to create a ~/.gemrc
. And it’s not a hack, for sure! :-)
Hope to have cleared things a bit!
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