The gem cmd you're picking up is from a different ruby install.

Try 'which ruby' vs 'which gem'.

On Aug 4, 2012, at 12:19, Tom Moulton <lists / ruby-forum.com> wrote:

> I am moving to a Westhost shared CPanel account and I am trying to set
> up my environment for my application but there must be something I am
> forgetting.
> 
> I am installing external gems and trying to use them. curl, xmlsimple
> and fsdb
> 
> They install ok and 'gem which gemname' finds them, but 'require'
> gemname fails
> 
> gotgritc / xyz.us [~/]# gem which xmlsimple
> /home/gotgritc/ruby/gems/gems/xml-simple-1.1.1/lib/xmlsimple.rb
> gotgritc / xyz.us [~]# gem which curl
> /home/gotgritc/ruby/gems/gems/curl-0.0.9/lib/curl.rb
> gotgritc / xyz.us [~]# gem which fsdb
> /home/gotgritc/ruby/gems/gems/fsdb-0.7.2/lib/fsdb.rb
> gotgritc / xyz.us [~]# ruby -rubygems -e 'require "xmlsimple.rb"'
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require': no such file to load -- xmlsimple.rb (LoadError)
> from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
> from -e:1
> gotgritc / xyz.us [~]# ruby -rubygems -e 'require "xmlsimple"'
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require': no such file to load -- xmlsimple (LoadError)
> from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
> from -e:1
> gotgritc / xyz.us [~]# ruby -rubygems -e 'require "curl"'
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require': no such file to load -- curl (LoadError)
> from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
> from -e:1
> gotgritc / xyz.us [~]# ruby -rubygems -e 'require "curl.rb"'
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require': no such file to load -- curl.rb (LoadError)
> from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
> from -e:1
> gotgritc / xyz.us [~]#
> 
> my gem enviroment is:
> 
> RubyGems Environment:
>  - RUBYGEMS VERSION: 1.8.24
>  - RUBY VERSION: 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
>  - INSTALLATION DIRECTORY: /home/gotgritc/ruby/gems
>  - RUBY EXECUTABLE: /usr/bin/ruby
>  - EXECUTABLE DIRECTORY: /home/gotgritc/ruby/gems/bin
>  - RUBYGEMS PLATFORMS:
>    - ruby
>    - x86_64-linux
>  - GEM PATHS:
>     - /home/gotgritc/ruby/gems
>  - GEM CONFIGURATION:
>     - :update_sources => true
>     - :verbose => true
>     - :benchmark => false
>     - :backtrace => false
>     - :bulk_threshold => 1000
>     - "gempath" => []
>     - "gem" => "--remote --gen-rdoc --run-tests"
>     - "gemhome" => "/home/gotgritc/ruby/gems"
>     - "rdoc" => "--inline-source --line-numbers"
>  - REMOTE SOURCES:
>     - http://rubygems.org/
> 
> -----------
> 
> One of the gems is installed at
> 
> gotgritc / xyz.us [~/ruby]# find . -name xmlsimple.rb
> ./gems/gems/xml-simple-1.1.1/lib/xmlsimple.rb
> gotgritc / xyz.us [~/ruby]#
> 
> is /home/gotgritc/ruby/gems/gems correct?
> 
> the first gems directory only has a gems subdirectory in it
> 
> it really bugs me that 'gem which' works but 'require' does not.
> Could it be a problem with 'custom_require'?
> 
> tom
> 
> -- 
> Posted via http://www.ruby-forum.com/.
>