Last active
August 29, 2015 14:03
-
-
Save alloy/8739bd036d084d8c082b to your computer and use it in GitHub Desktop.
Ruby with Psych bundled as gem can no longer work with YAML if the GEM_PATH environment variable is set incorrectly. (This includes it pointing to another Ruby installation!)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ruby -v | |
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin14] | |
$ env GEM_PATH=/gem/home/without/psych/gem ruby -ryaml -e '' | |
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/yaml.rb:4: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. | |
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- psych (LoadError) | |
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' | |
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/yaml.rb:5:in `<top (required)>' | |
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' | |
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
RVM, and possibly other Ruby version managers, appear to automatically configure your profile to set this env variable, pointing to their installation. However, this will break when using a different Ruby and gems that have C extensions.