Reputation: 1019
After installing Rails with rvm, I was faced with the following error:
/afs/andrew.cmu.edu/usr11/kvudata/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/yaml.rb:56:in '<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
So to get a little more information, I went irb and tried to require 'psych':
1.9.3-p327 :001 > require 'psych'
LoadError: libyaml-0.so.2: cannot open shared object file: No such file or directory -/afs/andrew.cmu.edu/usr11/kvudata/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/x86_64-linux/psych.so
But when I navigate to the specified location where it's trying to find psych.so
, it exists!
I have tried uninstalling ruby and reinstalling as well as uninstalling, compiling libyaml from source, and then reinstalling ruby, but to no avail, the error doesn't go away.
Upvotes: 4
Views: 4895
Reputation: 56
This doesn't feel like a "real" solution, but I was able to get things working.
In my case, libyaml is installed in /usr/local/lib
. Adding that path to my environment variables did the trick (inspired by Shared Libraries). I added the following to my .bash_profile
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH
For other visitors who - like me - are trying to make this work with capistrano, adding this to my deploy.rb worked:
set :default_environment, {'LD_LIBRARY_PATH' => '/usr/local/lib'}
I look forward to more informed suggestions.
Upvotes: 4