Unless you are using custom GEM environment variables or a .gemrc (or some multi ruby system like rvm) then the locations where rubygems are installed for each ruby installation will be different.
You can manage the locations used by rubygems by managing the GEM_HOME and GEM_PATH environment variables or the .gemrc file. It is possible to set your gems to be shared across ruby installations with these variables or the .gemrc
.gemrc:
http://docs.rubygems.org/read/chapter/11
GEM Environment variables:
http://docs.rubygems.org/read/chapter/12#page52
You can find the environment settings for a rubygems installation by running:
/path/to/gem env
This will output something like the following:
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.4
- RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0]
- INSTALLATION DIRECTORY: /opt/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /opt/local/bin/ruby
- EXECUTABLE DIRECTORY: /opt/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-darwin-10
- GEM PATHS:
- /opt/local/lib/ruby/gems/1.8
- /home/aji/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.rubyforge.org/", "http://gemcutter.org"]
- REMOTE SOURCES:
- http://gems.rubyforge.org/
- http://gemcutter.org
While the number of rubygems that are compatible with ruby 1.9 is constantly growing, you will need to check with the maintainer or homepage of each gem/project to verify if your gems will work or not.
Also check previous questions on SO regarding differences between 1.8 & 1.9:
http://stackoverflow.com/questions/21574/what-is-the-difference-between-ruby-1-8-and-ruby-1-9