Ruby 2.1.1 with RVM: Getting libyaml errors - ruby-on-rails

I would like to use Ruby 2.1.1p76 and Rails 4.1.0beta1. I am getting some errors with RVM. I was using Ruby 2.0.0 and Rails 4.0.0. I upgraded to OS X Mavericks 10.9.2 and needed to reload everything.
Anyway, these are the commands I am running.
\curl -sSL https://get.rvm.io | bash -s stable --ruby
This installs successfully. Then I run this command to install rails.
sudo gem install rails
I get the following errors, says it is looking for libyaml.
/Users/username/.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/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/Users/username/.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)
Referenced from: /Users/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/psych.bundle
Reason: image not found - /Users/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/psych.bundle
from /Users/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/psych.rb:1:in `<top (required)>'
from /Users/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/yaml.rb:5:in `<top (required)>'
from /Users/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems.rb:616:in `load_yaml'
from /Users/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/config_file.rb:328:in `load_file'
from /Users/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/config_file.rb:197:in `initialize'
from /Users/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/gem_runner.rb:74:in `new'
from /Users/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/gem_runner.rb:74:in `do_configuration'
from /Users/username/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/gem_runner.rb:39:in `run'
from /Users/username/.rvm/rubies/ruby-2.1.1/bin/gem:21:in `<main>'
So, I run this command which is deprecated.
rvm pkg install libyaml
This gives me a deprecation warning and says to check out autolibs.
So I correct and verify both.
brew install libyaml
##
Warning: libyaml-0.1.4 already installed
more...
brew info libyaml
##
libyaml: stable 0.1.5 (bottled)
http://pyyaml.org/wiki/LibYAML
/usr/local/Cellar/libyaml/0.1.4 (7 files, 344K) *
Built from source
From: https://github.com/mxcl/homebrew/commits/master/Library/Formula/libyaml.rb
==> Options
--universal
Install autolibs.
rvm get stable --autolibs=enable
rvm install ruby
rvm --default use ruby-2.1.1
Then, I get the same error.
Using /Users/username/.rvm/gems/ruby-2.1.1
/Users/username/.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.

brew unlink libyaml && brew link libyaml
https://github.com/wayneeseguin/rvm/issues/2689

Related

gem install rails -v 4.2.4 Failed to install

I receive the following error message when running this command:
gem install rails -v 4.2.4
This is the error:
/Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/yaml.rb:5: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/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/x86_64-darwin15/psych.bundle, 9): Library not loaded: /usr/local/opt/libyaml/lib/libyaml-0.2.dylib (LoadError)
Referenced from: /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/x86_64-darwin15/psych.bundle
Reason: image not found - /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/x86_64-darwin15/psych.bundle
from /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/psych.rb:7:in `<top (required)>'
from /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/yaml.rb:6:in `<top (required)>'
from /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems.rb:628:in `load_yaml'
from /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/config_file.rb:326:in `load_file'
from /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/config_file.rb:198:in `initialize'
from /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/gem_runner.rb:75:in `new'
from /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/gem_runner.rb:75:in `do_configuration'
from /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/gem_runner.rb:40:in `run'
from /Users/adamgoldberg/.rvm/rubies/ruby-2.3.0/bin/gem:21:in `<main>'
Please Help - this is causing me nightmares
It seems your ruby installation is missing psych (for YAML output).
Install libyaml with Homebrew: http://brew.sh; then try gem install rails -v 4.2.4
$ brew info libyaml
libyaml: stable 0.1.6 (bottled)
YAML Parser
http://pyyaml.org/wiki/LibYAML
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/libyaml.rb
==> Options
--universal
Build a universal binary
$ brew install libyaml
==> Downloading https://homebrew.bintray.com/bottles/libyaml-0.1.6_1.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libyaml-0.1.6_1.el_capitan.bottle.tar.gz
🍺 /usr/local/Cellar/libyaml/0.1.6_1: 8 files, 312.8K
REINSTALL RUBY
If the above solution doesn't work for you, reinstall Ruby from scratch with rvm or rbenv,
1) Try the instructions on this accepted answer: https://stackoverflow.com/a/38194139/1076207
—OR—
2) Remove all rvm files, then reinstall rvm: https://stackoverflow.com/a/38158619/1076207
—OR—
3) Remove all rvm files, then install rbenv: https://stackoverflow.com/a/38194231/1076207
After using one of the three options above, use http://bundler.io to install Rails:
$ mkdir ~/Documents/Repo
$ cd ~/Documents/Repo
$ gem install bundler
[…]
$ bundle init
Writing new Gemfile to /Users/username/Documents/Repo/Gemfile
$ echo "gem 'rails', '4.2.4'" >> Gemfile
$ bundle install
[…]
$ bundle exec rails new project_name
[…]
$ cd project_name
Personally, I recommend 3) switch to rbenv—I did.
The error itself clearly says that you should install libyaml first and then re-install your ruby. You can do it by running following commands.
sudo apt-get install libtool
rvm package install libyaml
rvm reinstall ruby-2.3.0
for more reference please see this answer

Error installing ruby-1.9.3-p547 with RVM on osx 10.9.3

How can I get around this error:
$ rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.9/x86_64/ruby-1.9.3-p547.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Warning: DYLD_LIBRARY_PATH environment variable is set, this might interact with the compilation and ruby.
Installing Ruby from source to: /Users/TomCaflisch/.rvm/rubies/ruby-1.9.3-p547, this may take a while depending on your cpu(s)...
ruby-1.9.3-p547 - #downloading ruby-1.9.3-p547, this may take a while depending on your connection...
ruby-1.9.3-p547 - #extracting ruby-1.9.3-p547 to /Users/TomCaflisch/.rvm/src/ruby-1.9.3-p547...
ruby-1.9.3-p547 - #applying patch /Users/TomCaflisch/.rvm/patches/ruby/GH-488.patch.
ruby-1.9.3-p547 - #configuring.
Error running './configure --prefix=/Users/TomCaflisch/.rvm/rubies/ruby-1.9.3-p547 --with-opt-dir=/usr/local/Cellar/libyaml/0.1.4:/usr/local/Cellar/readline/6.2.4:/usr/local/Cellar/libksba/1.3.0:/usr/local/Cellar/openssl/1.0.1e --without-tcl --without-tk --disable-install-doc --enable-shared',
showing last 15 lines of /Users/TomCaflisch/.rvm/log/1404187306_ruby-1.9.3-p547/configure.log
[2014-06-30 23:01:50] ./configure
current path: /Users/TomCaflisch/.rvm/src/ruby-1.9.3-p547
GEM_HOME=/Users/TomCaflisch/.rvm/gems/ruby-1.9.3-p327
PATH=/Users/TomCaflisch/.rvm/usr/bin:/usr/local/Cellar/pkg-config/0.28/bin:/usr/local/Cellar/libtool/2.4.2/bin:/usr/local/Cellar/automake/1.14/bin:/usr/local/Cellar/autoconf/2.69/bin:/Users/TomCaflisch/.rvm/gems/ruby-1.9.3-p327/bin:/Users/TomCaflisch/.rvm/gems/ruby-1.9.3-p327#global/bin:/Users/TomCaflisch/.rvm/rubies/ruby-1.9.3-p327/bin:/Users/TomCaflisch/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/mysql/bin
GEM_PATH=/Users/TomCaflisch/.rvm/gems/ruby-1.9.3-p327:/Users/TomCaflisch/.rvm/gems/ruby-1.9.3-p327#global
command(7): ./configure --prefix=/Users/TomCaflisch/.rvm/rubies/ruby-1.9.3-p547 --with-opt-dir=/usr/local/Cellar/libyaml/0.1.4:/usr/local/Cellar/readline/6.2.4:/usr/local/Cellar/libksba/1.3.0:/usr/local/Cellar/openssl/1.0.1e --without-tcl --without-tk --disable-install-doc --enable-shared
configure: WARNING: unrecognized options: --without-tcl, --without-tk
checking build system type... x86_64-apple-darwin13.2.0
checking host system type... x86_64-apple-darwin13.2.0
checking target system type... x86_64-apple-darwin13.2.0
checking whether the C compiler works... no
configure: error: in `/Users/TomCaflisch/.rvm/src/ruby-1.9.3-p547':
configure: error: C compiler cannot create executables
See `config.log' for more details
There has been an error while running configure. Halting the installation.
I'm rocking osx 10.9.4 at the moment.
When i do $ rvm get latest, I get this error:
$ rvm get latest
Downloading https://get.rvm.io
Downloading https://github.com/wayneeseguin/rvm/archive/1.25.28.tar.gz
Upgrading the RVM installation in /Users/TomCaflisch/.rvm/
RVM PATH line found in /Users/TomCaflisch/.bashrc /Users/TomCaflisch/.zshrc.
RVM sourcing line found in /Users/TomCaflisch/.bash_profile /Users/TomCaflisch/.zprofile.
Installing gem-wrappers gem in 4 gemsetsError running 'gem install gem-wrappers -v >=1.2.4 --no-ri --no-rdoc',
showing last 15 lines of /Users/TomCaflisch/.rvm/log/1405391557_ruby-1.9.3-p484/gem.install.gem-wrappers->=1.2.4.log
PATH=/Users/TomCaflisch/.rvm/gems/ruby-1.9.3-p484#global/bin:/Users/TomCaflisch/.rvm/rubies/ruby-1.9.3-p484/bin:/Users/TomCaflisch/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/mysql/bin
GEM_PATH=/Users/TomCaflisch/.rvm/gems/ruby-1.9.3-p484#global
command(7): gem install gem-wrappers -v >=1.2.4 --no-ri --no-rdoc
Error loading RubyGems plugin "/Users/TomCaflisch/.rvm/gems/ruby-1.9.3-p484#global/gems/executable-hooks-1.2.6/lib/rubygems_plugin.rb": dlopen(/Users/TomCaflisch/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/x86_64-darwin12.5.0/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /Users/TomCaflisch/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/x86_64-darwin12.5.0/openssl.bundle
Reason: image not found - /Users/TomCaflisch/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/x86_64-darwin12.5.0/openssl.bundle (LoadError)
/Users/TomCaflisch/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/yaml.rb:84: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.
ERROR: Loading command: install (LoadError)
dlopen(/Users/TomCaflisch/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/x86_64-darwin12.5.0/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /Users/TomCaflisch/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/x86_64-darwin12.5.0/openssl.bundle
Reason: image not found - /Users/TomCaflisch/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/x86_64-darwin12.5.0/openssl.bundle
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
Error running 'gem install gem-wrappers -v >=1.2.4 --no-ri --no-rdoc',
showing last 15 lines of /Users/TomCaflisch/.rvm/log/1405391559_ruby-2.0.0-p247/gem.install.gem-wrappers->=1.2.4.log
Reason: image not found - /Users/TomCaflisch/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.4.0/psych.bundle
from /Users/TomCaflisch/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/psych.rb:1:in `<top (required)>'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/yaml.rb:5:in `<top (required)>'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems.rb:659:in `load_yaml'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/config_file.rb:327:in `load_file'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/config_file.rb:196:in `initialize'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/gem_runner.rb:74:in `new'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/gem_runner.rb:74:in `do_configuration'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/gem_runner.rb:39:in `run'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.0.0-p247/bin/gem:21:in `<main>'
Error running 'gem install gem-wrappers -v >=1.2.4 --no-ri --no-rdoc',
showing last 15 lines of /Users/TomCaflisch/.rvm/log/1405391560_ruby-2.1.0-preview1/gem.install.gem-wrappers->=1.2.4.log
Reason: image not found - /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/x86_64-darwin12.5.0/psych.bundle
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:53:in `require'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/psych.rb:1:in `<top (required)>'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:53:in `require'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:53:in `require'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/yaml.rb:5:in `<top (required)>'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:53:in `require'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:53:in `require'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/rubygems.rb:659:in `load_yaml'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/rubygems/config_file.rb:326:in `load_file'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/rubygems/config_file.rb:195:in `initialize'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/rubygems/gem_runner.rb:74:in `new'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/rubygems/gem_runner.rb:74:in `do_configuration'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/rubygems/gem_runner.rb:39:in `run'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview1/bin/gem:21:in `<main>'
Error running 'gem install gem-wrappers -v >=1.2.4 --no-ri --no-rdoc',
showing last 15 lines of /Users/TomCaflisch/.rvm/log/1405391560_ruby-2.1.0-preview2/gem.install.gem-wrappers->=1.2.4.log
Reason: image not found - /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview2/lib/ruby/2.1.0/x86_64-darwin12.0/psych.bundle
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview2/lib/ruby/2.1.0/psych.rb:1:in `<top (required)>'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview2/lib/ruby/2.1.0/yaml.rb:5:in `<top (required)>'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview2/lib/ruby/site_ruby/2.1.0/rubygems.rb:659:in `load_yaml'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview2/lib/ruby/site_ruby/2.1.0/rubygems/config_file.rb:327:in `load_file'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview2/lib/ruby/site_ruby/2.1.0/rubygems/config_file.rb:196:in `initialize'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview2/lib/ruby/site_ruby/2.1.0/rubygems/gem_runner.rb:74:in `new'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview2/lib/ruby/site_ruby/2.1.0/rubygems/gem_runner.rb:74:in `do_configuration'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview2/lib/ruby/site_ruby/2.1.0/rubygems/gem_runner.rb:39:in `run'
from /Users/TomCaflisch/.rvm/rubies/ruby-2.1.0-preview2/bin/gem:21:in `<main>'
.
Upgrade of RVM in /Users/TomCaflisch/.rvm/ is complete.
# Tom Caflisch,
#
# Thank you for using RVM!
# We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.
In case of problems: http://rvm.io/help and https://twitter.com/rvm_io
Upgrade Notes:
* No new notes to display.
RVM reloaded!
Was running in to the same issue. Just ran these commands sorted everything out...
$ xcode-select --install - this seems to be the key.
$ rvm cleanup all - may need to run sudo on this one.
$ rvm get latest
$ rvm install ruby-1.9.3- with whatever patch.
Hope this works for you!
Looks like you're missing the Xcode command line tools.
Try running
xcode-select --install
then run
gcc --version
to see if GCC or LLVM is installed. If it is, you can try installing ruby through RVM again.
I had the same issue. For me this solved the problem:
Launch Xcode. When it launched for me it asked permission to finish downloading and installing a few things (sorry I don't recall the exact message or if it even listed the items). I agreed and waited for it to finish download/installation.
I tried rvm install 1.9.3 again and it worked. rvm get latest also now works without issue.

Gem libxml-ruby (1.1.4) installs but fails on runtime

I'm trying to run one quite old Rails application on Mavericks where one of the requirements are:
- Ruby ree-1.8.7-2009.10
- Rails 3.0.0
- libxml-ruby 1.1.4 (that's the latest version compatible with the rest of the gems.
I have latest libxml2 package installed. It's version from Homebrew (2.9.1).
To install this gem I used following command:
$ CC=gcc-4.2 gem install libxml-ruby -v '1.1.4'
Output suggested success:
Building native extensions. This could take a while...
Successfully installed libxml-ruby-1.1.4
1 gem installed
though when I try run some rake task, i.e. creating database
bundle exec rake db:create
I get following error:
$ bundle exec rake db:create [ree-1.8.7-2009.10#mygemset]
rake aborted!
dlsym(0x7ffa2d83bbe0, Init_libxml_ruby): symbol not found - /Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:597:in `new_constants_in'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/libxml-ruby-1.1.4/lib/libxml.rb:9
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:597:in `new_constants_in'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
/Users/myuser/Developer/my-project/vendor/private_gems/restful_authentication-1.4.9/lib/sso/sso.rb:3
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:597:in `new_constants_in'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#mygemset/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
/Users/myuser/Developer/my-project/vendor/private_gems/restful_authentication-1.4.9/lib/restful_sso_authentication.rb:2
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#global/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in `require'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#global/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in `require'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#global/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in `each'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#global/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in `require'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#global/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in `each'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#global/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in `require'
/Users/myuser/.rvm/gems/ree-1.8.7-2009.10#global/gems/bundler-1.5.2/lib/bundler.rb:131:in `require'
/Users/myuser/Developer/my-project/config/application.rb:5
/Users/myuser/Developer/my-project/Rakefile:6:in `require'
/Users/myuser/Developer/my-project/Rakefile:6
(See full trace by running task with --trace)
I have tried numerous approaches that can be found on Internet (the most relevant examples concerned problems with installing Nokogiri and similar errors where listed) and none of them worked.
Here is my way to install Rubies on variety of Mac OSes for long long time. For me, there were any no problems with any library or gem. For example more complex Nokogiri gem builds and works like a charm.
Check XCode version
xcodebuild -version
xcode-select --install
Install Homebrew as per it's documentation
Install prerequisites
brew doctor; # Just do what it wants!
brew update;
brew upgrade; # Watch out! for existing bottles
brew install libtool libxml2 libxslt openssl sqlite libyaml;
brew install autoconf automake apple-gcc42;
brew cleanup; # Watch out! for existing bottles
brew tap homebrew/dupes; # Watch out! for existing bottles
Install RVM
curl -L https://get.rvm.io | bash -s stable # Latest stable
rvm get latest
rvm reload # :)
rvm autolibs enable
rvm requirements
Install Ruby
rvm install 2.1 --disable-binary
Probably a previous version break the native loading or your libxml2 is too recent and don't fit the gem implementation.
first uninstall all previous gems (gemset, system)
then reinstall the gem
https://gist.github.com/unixcharles/1226596 ?

Installation of Rubygems fails on Ruby 2.0.0 Install on OSX Mavericks

I am trying to install rubygems but get the following error:
'$ rvm install ruby
.........
Installing rubygems-2.1.11 for ruby-2.0.0-p353............
Error running 'env GEM_PATH=/Users/Vasenka/.rvm/gems/ruby-2.0.0-p353:/Users/Vasenka/.rvm/gems/ruby-2.0.0-p353#global:/Users/Vasenka/.rvm/gems/ruby-2.0.0-p353:/Users/Vasenka/.rvm/gems/ruby-2.0.0-p353#global GEM_HOME=/Users/Vasenka/.rvm/gems/ruby-2.0.0-p353 /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/bin/ruby -d /Users/Vasenka/.rvm/src/rubygems-2.1.11/setup.rb',
please read /Users/Vasenka/.rvm/log/1386179561_ruby-2.0.0-p353/rubygems.install.log
Installation of rubygems did not complete successfully.
........
Making gemset ruby-2.0.0-p353
pristine..............
Error running '__rvm_with ruby-2.0.0-p353 /Users/Vasenka/.rvm/scripts/gemsets pristine',
please read /Users/Vasenka/.rvm/log/1386183855_ruby-2.0.0-p353/gemset.pristine-ruby-2.0.0-p353.log
.rvm/log/1386179561_ruby-2.0.0-p353/rubygems.install.log states:
[2013-12-04 17:59:26] /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/bin/ruby
current path: /Users/Vasenka/.rvm/src/rubygems-2.1.11
command(6): env GEM_PATH=/Users/Vasenka/.rvm/gems/ruby-2.0.0-p353:/Users/Vasenka/.rvm/gems/ruby-2.0.0-p353#global:/Users/Vasenka/.rvm/gems/ruby-2.0.0-p353:/Users/Vasenka/.rvm/gems/ruby-2.0.0-p353#global GEM_HOME=/Users/Vasenka/.rvm/gems/ruby-2.0.0-p353 /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/bin/ruby -d /Users/Vasenka/.rvm/src/rubygems-2.1.11/setup.rb
Exception `LoadError' at /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/rubygems.rb:1087 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/rubygems.rb:1096 - cannot load such file -- rubygems/defaults/ruby/Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/psych.rb:205:in `parse': (<unknown>): mapping values are not allowed in this context at line 2 column 29 (Psych::SyntaxError)
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/psych.rb:205:in `parse_stream'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/psych.rb:153:in `parse'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/psych.rb:129:in `load'
from /Users/Vasenka/.rvm/src/rubygems-2.1.11/lib/rubygems/config_file.rb:332:in `load_file'
from /Users/Vasenka/.rvm/src/rubygems-2.1.11/lib/rubygems/config_file.rb:197:in `initialize'
from /Users/Vasenka/.rvm/src/rubygems-2.1.11/lib/rubygems/gem_runner.rb:74:in `new'
from /Users/Vasenka/.rvm/src/rubygems-2.1.11/lib/rubygems/gem_runner.rb:74:in `do_configuration'
from /Users/Vasenka/.rvm/src/rubygems-2.1.11/lib/rubygems/gem_runner.rb:39:in `run'
from setup.rb:45:in `<main>'
Command Line Developer Tools are installed. Ruby gets successfully installed. . .
$ruby -v
ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin13.0.0]
$ gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
But gems are all wrong:
$ gem -v
/Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/psych.rb:205:in `parse': (<unknown>): mapping values are not allowed in this context at line 2 column 29 (Psych::SyntaxError)
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/psych.rb:205:in `parse_stream'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/psych.rb:153:in `parse'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/psych.rb:129:in `load'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/rubygems/config_file.rb:319:in `load_file'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/rubygems/config_file.rb:192:in `initialize'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/rubygems/gem_runner.rb:66:in `new'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/rubygems/gem_runner.rb:66:in `do_configuration'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/rubygems/gem_runner.rb:46:in `run'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/bin/gem:21:in `<main>'
Tried this:
$ rvm requirements
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
rvm get stable
Downloading https://get.rvm.io
Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz
Upgrading the RVM installation in /Users/Vasenka/.rvm/
RVM PATH line found in /Users/Vasenka/.bashrc /Users/Vasenka/.zshrc.
RVM sourcing line found in /Users/Vasenka/.bash_profile /Users/Vasenka/.zlogin.
Installing rvm gem in 1 gemsets /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/psych.rb:205:in `parse': (<unknown>): mapping values are not allowed in this context at line 2 column 29 (Psych::SyntaxError)
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/psych.rb:205:in `parse_stream'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/psych.rb:153:in `parse'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/psych.rb:129:in `load'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/rubygems/config_file.rb:319:in `load_file'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/rubygems/config_file.rb:192:in `initialize'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/rubygems/gem_runner.rb:66:in `new'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/rubygems/gem_runner.rb:66:in `do_configuration'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/rubygems/gem_runner.rb:46:in `run'
from /Users/Vasenka/.rvm/rubies/ruby-2.0.0-p353/bin/gem:21:in `<main>'
could try with this rvm reinstall 2.0.0 --verify-downloads 1
There might be an issue with libyaml or an issue related to xcode after upgraded to Mavericks:
$ xcode-select --install # if you upgraded to Mavericks
$ brew update # if using homebrew
$ rvm get head # to get lastest rvm
$ rvm pkg install libyaml
$ rvm pkg install readline
$ rvm reinstall all --force
Other possibility is some YAML parse error on your ~/.gemrc
If none of that works try rvm GUI ruby manager (free) for OSX or RailsInstaller which will set RVM for you.

Getting nokogiri to use a newer version of libxml2

I've been trying to get Nokogiri installed on my computer (Mountain Lion) to use with rspec and capybara, but for the life of me, I can't get it to run properly.
From what I can tell, the issue is with nokogiri using the wrong version of libxml2. I've so far tried uninstalling and reinstalling libxml2 using Homebrew (making sure it's the most recent one), uninstalling and reinstalling nokogiri using bundle, and specifying the exact path to the libxml2 files that Homebrew installed when installing the nokogiri gem. My most recent install instructions looked like this
sudo gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.9.0/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.0/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28
where all of those locations do correctly correspond to the locations where the tools are installed. However, upon running bundle exec rspec spec/requests/static_pages.rb, I still get this output:
/Users/alex/.rvm/gems/ruby-1.9.3-p286/gems/nokogiri-1.5.9/lib/nokogiri.rb:28:in `require': dlopen(/Users/alex/.rvm/gems/ruby-1.9.3-p286/gems/nokogiri-1.5.9/lib/nokogiri/nokogiri.bundle, 9): Library not loaded: /usr/local/lib/libxml2.2.dylib (LoadError)
Referenced from: /Users/alex/.rvm/gems/ruby-1.9.3-p286/gems/nokogiri-1.5.9/lib/nokogiri/nokogiri.bundle
Reason: Incompatible library version: nokogiri.bundle requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0 - /Users/alex/.rvm/gems/ruby-1.9.3-p286/gems/nokogiri-1.5.9/lib/nokogiri/nokogiri.bundle
from /Users/alex/.rvm/gems/ruby-1.9.3-p286/gems/nokogiri-1.5.9/lib/nokogiri.rb:28:in `<top (required)>'
from /Users/alex/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require'
from /Users/alex/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Users/alex/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each'
from /Users/alex/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `block in require'
from /Users/alex/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each'
from /Users/alex/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require'
from /Users/alex/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.3.4/lib/bundler.rb:132:in `require'
from /Users/alex/Sites/harbingernews/config/application.rb:7:in `<top (required)>'
from /Users/alex/Sites/harbingernews/config/environment.rb:2:in `require'
from /Users/alex/Sites/harbingernews/config/environment.rb:2:in `<top (required)>'
from /Users/alex/Sites/harbingernews/spec/spec_helper.rb:3:in `require'
from /Users/alex/Sites/harbingernews/spec/spec_helper.rb:3:in `<top (required)>'
from /Users/alex/Sites/harbingernews/spec/requests/static_pages_spec.rb:1:in `require'
from /Users/alex/Sites/harbingernews/spec/requests/static_pages_spec.rb:1:in `<top (required)>'
from /Users/alex/.rvm/gems/ruby-1.9.3-p286/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `load'
from /Users/alex/.rvm/gems/ruby-1.9.3-p286/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `block in load_spec_files'
from /Users/alex/.rvm/gems/ruby-1.9.3-p286/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `map'
from /Users/alex/.rvm/gems/ruby-1.9.3-p286/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `load_spec_files'
from /Users/alex/.rvm/gems/ruby-1.9.3-p286/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:22:in `run'
from /Users/alex/.rvm/gems/ruby-1.9.3-p286/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:69:in `run'
from /Users/alex/.rvm/gems/ruby-1.9.3-p286/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:10:in `block in autorun'
I've tried all the steps that I've found online (most reference building and loading different versions of libxml2, like this one, but have had no success yet. My Gemfile and Gemfile.lock can be found here. If anyone can help me out at all, I would really appreciate it. I haven't been able to find any other cases online with this problem.
In Mavericks, installing the libraries with brew and setting NOKOGIRI_USE_SYSTEM_LIBRARIES=1 before installing the gem did the trick for me.
Summarising:
If previously installed, uninstall the gem:
$ gem uninstall nokogiri
Use Homebrew to install libxml2, libxslt and libiconv:
$ brew install libxml2 libxslt libiconv
Install the gem specifying the paths to the libraries to be linked against:
$ NOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem install nokogiri -- --use-system-libraries --with-iconv-dir="$(brew --prefix libiconv)" --with-xml2-config="$(brew --prefix libxml2)/bin/xml2-config" --with-xslt-config="$(brew --prefix libxslt)/bin/xslt-config"
This helps me to update libxml and install nokogiri correctly...
gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2
brew install libxml2 --with-xml2-config
brew link --force libxml2
brew install libxslt
brew link --force libxslt
bundle config build.nokogiri -- --with-xml2-dir=/usr
--with-xslt-dir=/opt/local --with-iconv-dir=/opt/local
bundle install
Here is the source: http://www.kormoc.com/2013/12/22/nokogiri-libxml2/
Hope this helps somebody...
Just to make it clear, Phrogz's comment helped me out quite a bit. I followed the instructions that he linked to, the What to do if libxml2 is being a jerk? page on Nokogiri's Github page. I ended up using Macports instead of Homebrew, and I'm not sure if that's what made the difference (I had tried many of those steps already) but one way or another, it seems to be working alright now.
Googled this question after upgrading OsX when I had problem:
require': dlopen(/Users/tomi/.rvm/gems/ruby-2.1.1#my-gemset/extensions/x86_64-darwin-12/2.1.0-static/nokogiri-1.5.10/nokogiri/nokogiri.bundle, 9): Library not loaded: /usr/local/opt/libxml2/lib/libxml2.2.dylib (LoadError)
and this worked for me
brew uninstall libxml2 libxslt libiconv
brew install libxml2 libxslt libiconv

Resources