My emacs shell can't load any of my installed ruby gems. I'm getting a Gem::LoadError when trying to execute any installed gem from emacs but it works from Terminal. Here's all the information I've reviewed in my environment. Thanks for any help!
From Terminal (bash), I'm able to run the gems (e.g., haml somepage.haml or rails create someapp)
In emacs, I've set the shell (bash) path to load the same as the terminal shell (via ~/.MacOSX/application.plist).
echo $PATH
returns the same result from terminal and emacs
I can run IRB and rvm from emacs shell.
Running gem list
from emacs shell shows I have haml (3.1.2, 3.1.1) installed.
Running: which rvm, which gem, which haml
#all return the same path in both Terminal and Emacs
When I try to execute a gem (e.g., haml), I get the following:
/Users/me/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:900:in
report_activate_error': Could not find RubyGem haml (>= 0) (Gem::LoadError) from /Users/me/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:248:in
activate' from /Users/me/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:1276:ingem' from /Users/me/.rvm/gems/ruby-1.9.2-p180/bin/haml:18:in
'
Make sure your GEM_HOME
environment variable is set properly or you may have trouble. rvm
does move this from the usual location, and bundler
can move it again.
This is particularly important if you're loading gems from your home directory because they are managed by rvm
.
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