I have installed rvm on my Mac OSX and Ruby 1.9.3 and I also installed
I created my own gem which is successfully installed with gem install.
If I enter the command “gem list”, I get a long list of gems, mostly
rails and also my own installed gem.
But if I try to require any of these gems in my source code,
‘actionmailer’ for instance, I get a load error
in `require’: cannot load such file – actionmailer (LoadError)
Here is my source code:
and here is the output:
require': cannot load such file -- actionmailer (LoadError) from /Users/kary/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire’
from …/ruby-1.9.3/test_timecode.rb:3:in `’
The gems are actually installed in
bash-3.2$ rvm gemdir
Why can’t Ruby find my gems when I require them?
Thanks in advance