how to solve “ruby installation is missing psych” error?

后端 未结 30 3398
悲哀的现实
悲哀的现实 2020-11-28 17:54

I used rvm to install ruby 1.9.3. even though it was successfully installed, it complained about libyaml. and now every time i wanna install a gem (say rails) this warning s

30条回答
  •  自闭症患者
    2020-11-28 18:46

    I had the same problem (Cent OS 5.7), none of the above solutions worked to me.

    // My console warning
    /usr/local/rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/yaml.rb:56:in `':
    It seems your ruby installation is missing psych (for YAML output).
    To eliminate this warning, please install libyaml and reinstall your ruby.
    

    After doing several re-installs, I realized it's looking for yaml in ruby version of 1.9.1 instead of 1.9.3. So i downgraded

    // obviously after installing `libyaml`
    rvm remove all
    rvm install 1.9.1
    rvm use 1.9.1 --default
    

    And it worked 8D!

提交回复
热议问题