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

后端 未结 30 3208
悲哀的现实
悲哀的现实 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:30

    I had the same problem (Lion 10.7.4), and fixed it by upgrading rvm then reinstalling ruby

    1) upgrade rvm https://rvm.io//rvm/install/

    curl -L https://get.rvm.io | bash -s stable --ruby
    

    2) Then use rvm to reinstall ruby 1.9.3 (which had been previously installed with the earlier version of rvm)

    rvm reinstall 1.9.3
    
    0 讨论(0)
  • 2020-11-28 18:31
    brew install libyaml
    rvm reinstall 1.9.3
    

    Is what worked for me (on Snow Leopard).

    0 讨论(0)
  • 2020-11-28 18:32

    If you have installed ruby on macOS with homebrew, try this solution.

    rm -rf /usr/local/lib/ruby/gems/ && brew reinstall ruby

    Note that this will get rid of all installed gems. Best save a list of installed gems with gem list before you run this.

    0 讨论(0)
  • 2020-11-28 18:33

    This is what worked for me on Ubuntu:
    - installing libyaml-dev (sudo apt-get install libyaml-dev)
    - installing rvm + ruby 1.9.3

    0 讨论(0)
  • 2020-11-28 18:34

    I had this problem. libyaml wouldn't compile. It turns out I was missing libtool.

    yum install libtool
    yum install libyaml (or rvm pkg install libyaml)
    rvm reinstall 1.9.3
    

    That solved my problem.

    0 讨论(0)
  • 2020-11-28 18:34

    This worked for me at least on Ubuntu 10.04

    $ sudo apt-get install libtool

    $ rvm reinstall 1.9.3

    0 讨论(0)
提交回复
热议问题