Skip to content

Instantly share code, notes, and snippets.

@UnderpantsGnome
Created January 29, 2010 05:46
Show Gist options
  • Save UnderpantsGnome/289486 to your computer and use it in GitHub Desktop.
Save UnderpantsGnome/289486 to your computer and use it in GitHub Desktop.
rvm global gems per ruby
########################################
### Start with a "clean" environment ###
########################################
mmoen@shiny:~/tmp$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.6 (2009-08-04 patchlevel 383) [i686-darwin10.2.0]
- INSTALLATION DIRECTORY: /Users/mmoen/.rvm/gems/ruby/1.8.6
- RUBY EXECUTABLE: /Users/mmoen/.rvm/ruby-1.8.6-p383/bin/ruby
- EXECUTABLE DIRECTORY: /Users/mmoen/.rvm/gems/ruby/1.8.6/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-darwin-10
- GEM PATHS:
- /Users/mmoen/.rvm/gems/ruby/1.8.6
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- "gemcutter_key" => "--snip--"
- :sources => ["http://gemcutter.org", "http://gems.rubyforge.org/", "http://gems.github.com"]
- REMOTE SOURCES:
- http://gemcutter.org
- http://gems.rubyforge.org/
- http://gems.github.com
##############################
### Switch to a new gemset ###
##############################
mmoen@shiny:~/tmp$ rvm 1.8.6%clean
########################
### New env, no gems ###
########################
mmoen@shiny:~/tmp$ gem list
*** LOCAL GEMS ***
######################################
### Switch to global for this ruby ###
######################################
mmoen@shiny:~/tmp$ rvm 1.8.6%global
mmoen@shiny:~/tmp$ gem list
*** LOCAL GEMS ***
#####################
### Still no gems ###
#####################
mmoen@shiny:~/tmp$ gem install rake
Successfully installed rake-0.8.7
1 gem installed
Installing ri documentation for rake-0.8.7...
Installing RDoc documentation for rake-0.8.7...
mmoen@shiny:~/tmp$ gem list
*** LOCAL GEMS ***
rake (0.8.7)
#####################
### Still no gems ###
#####################
mmoen@shiny:~/tmp$ rvm 1.8.6%clean
mmoen@shiny:~/tmp$ gem list
*** LOCAL GEMS ***
#######################################################
### Update the gem_path, adding ruby_version%global ###
#######################################################
mmoen@shiny:~/tmp$ export GEM_PATH=/Users/mmoen/.rvm/gems/ruby/1.8.6%global:$GEM_PATH
mmoen@shiny:~/tmp$ gem list
*** LOCAL GEMS ***
rake (0.8.7)
################################################
### Sweet, we have access to the global gems ###
################################################
mmoen@shiny:~/tmp$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.6 (2009-08-04 patchlevel 383) [i686-darwin10.2.0]
- INSTALLATION DIRECTORY: /Users/mmoen/.rvm/gems/ruby/1.8.6%clean
- RUBY EXECUTABLE: /Users/mmoen/.rvm/ruby-1.8.6-p383/bin/ruby
- EXECUTABLE DIRECTORY: /Users/mmoen/.rvm/gems/ruby/1.8.6%clean/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-darwin-10
- GEM PATHS:
- /Users/mmoen/.rvm/gems/ruby/1.8.6%clean
- /Users/mmoen/.rvm/gems/ruby/1.8.6%global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- "gemcutter_key" => "--snip--"
- :sources => ["http://gemcutter.org", "http://gems.rubyforge.org/", "http://gems.github.com"]
- REMOTE SOURCES:
- http://gemcutter.org
- http://gems.rubyforge.org/
- http://gems.github.com
mmoen@shiny:~/tmp$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment