Closed
Description
I've tried using RVM since I've upgraded to OSX Mavericks, and I've come across the same issue more than once while trying to install gems.
When using Ruby 2.1.1 as my installation, and running gem install minitest
, I received the following error:
gem install minitest
/Users/pzula/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.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.
/Users/pzula/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/Users/pzula/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/psych.bundle, 9): Library not loaded: /usr/local/lib/libyaml-0.2.dylib (LoadError)
...........
Having read the error message, I thought perhaps I somehow have autolibs turned off, so I went ahead and removed RVM from the system, and reinstalled using the following command:
\curl -sSL https://get.rvm.io | bash -s stable --ruby
However, even after reinstalling RVM, I am unable to install gems due to the libyaml error. Am I doing something incorrectly? Do I have to install libyaml separately?
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
mpapis commentedon Mar 10, 2014
can you please show me:
rvm reinstall 2.1.1 --debug
rvm use 2.1.1 ; ruby -wdS gem install minitest
pzula commentedon Mar 11, 2014
@mpapis, here is the output of rvm reinstall 2.1.1 --debug: https://gist.github.com/pzula/9477008
and here is the output of the second command: https://gist.github.com/pzula/9477024
mpapis commentedon Mar 11, 2014
hmm, nothing obvious, now run:
mpapis commentedon Mar 11, 2014
btw. was this ruby initially upgraded from older version or installed?
pzula commentedon Mar 11, 2014
I initially have everything working before upgrading to Mavericks. After the upgrade, nothing worked, so I uninstalled & reinstalled.
Output of find:
mpapis commentedon Mar 11, 2014
ah it complains that
/Users/pzula/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/psych.bundle
can not find/usr/local/lib/libyaml-0.2.dylib
this path is from homebrew, show me:I'm getting a feeling it's another time when you need to link packages in homebrew event they are keg only
pzula commentedon Mar 11, 2014
@mpapis, here is that output: https://gist.github.com/pzula/9484355
mpapis commentedon Mar 11, 2014
you should be able to fix the problem with:
but then it makes
brew doctor
unhappy, so now show me:/Users/pzula/.rvm/src/ruby-2.1.1/ext/psych/mkmf.log
/Users/pzula/.rvm/src/ruby-2.1.1/ext/psych/Makefile
also check Homebrew/legacy-homebrew#26367
pzula commentedon Mar 11, 2014
Makefile: https://gist.github.com/pzula/9484560
mkmf.log: https://gist.github.com/pzula/9484545
mpapis commentedon Mar 11, 2014
It looks like somehow ruby/homebrew links to wrong libyaml library, please open a bug for ruby here: https://bugs.ruby-lang.org/projects/ruby-trunk/issues/new
include this gists:
you can mention this ticket and the homebrew one Homebrew/legacy-homebrew#26367
as it might take some time to get answer there try this to get temporary fix:
3 remaining items
thanhnguyen9 commentedon May 16, 2014
I have the same problem. Would somebody plz help me? My system
ruby 2.1.1
rails 4.1.1
rvm 1.25.25
bundler 1.6
https://gist.github.com/thanh8604/bb5996524b4febbe21ea
mpapis commentedon May 20, 2014
@thanh8604 no it does not look like the same problem, you need to read the log, it points to a problem in your file
/Users/thanhnguyen/Downloads/learn_ruby-master/00_hello/hello.rb:7: syntax error, unexpected keyword_end (SyntaxError)
mcka1n commentedon May 20, 2014
phew! @tomjoro yeah it works, you just saved my day :) 👍
thanhnguyen9 commentedon May 21, 2014
Ive already fix that "end" problem. I think my ruby don't have enough gem or spec. Do y'all have any idea? I've been struggling with this for a month and still stuck. Cant get it run.
rys commentedon May 22, 2014
@thanh8604 can you please file a new issue with your problem and gist the current output on your system so we can help
thanhnguyen9 commentedon May 24, 2014
This is what i get. Thank you for ur answer.
https://gist.github.com/thanh8604/bb5996524b4febbe21ea
thanhnguyen9 commentedon May 28, 2014
This is what i get. Plz help me
https://gist.github.com/thanh8604/bb5996524b4febbe21ea
On Thu, May 22, 2014 at 5:58 PM, Rys Sommefeldt notifications@github.comwrote:
mpapis commentedon May 29, 2014
@thanh8604 it's not RVM problem, please read the error again, it shows you that
”
is not a function, it is a double quote but it is not the one that you were supposed to use"” - I guess your editor might be changing your quotes, make sure they all are the same
"` and you should be finempapis commentedon Jun 6, 2014
closing as the problem does not repeat that often (any more) and I already forgot the idea about warning, if you hit tis problem again please let me know
asbjornu commentedon Aug 20, 2014
I got the installing gem fails with permission error when trying to do
gem install cocoapods
, which made me search for a solution mentioningrvm
. The problem is thatrvm
doesn't seem to be available in Homebrew. However,rbenv
is. So even though my solution relates torbenv
, I believervm
andrbenv
does something so similar that this comment might be worthwile having out there.After installing
rbenv
, I got the problem mentioned in this thread aboutlibyaml
not being installed. What fixed that problem was typing this in the terminal:brew unlink libyaml && brew link libyaml
After that, I now have a ruby gem setup with
gem env
returning:As well as
gem install cocoapods
now working. Which is sweet. :)amboxer21 commentedon Dec 25, 2015
Why the fuck is everyone using rmv? Is everyone that lazy and cant navigate a Linux terminal?