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
I was having this error and noticed I had different versions of Ruby installed with HomeBrew, along with many gems that I no longer used. So did a full clean up like this:
$ brew remove --force ruby # remove all versions installed
$ sudo rm -rf /usr/local/lib/ruby # remove all gems and leftover files
$ brew install ruby
$ gem install bundler
$ bundle install
If you don't use a Gemfile
, make sure you know which gems to reinstall.