Install Compass on OS X Yosemite - ruby

I'm trying to install compass using GEM but i have a lot of error.
My macbook pro is running OS X Yosemite.
Anyone have the same problem ?
Thank you for your time.
Have a nice day
sudo gem install compass
Password:
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20141019-17085-1dv9dek.rb extconf.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.5/ext/ffi_c in PATH, mode 040777
checking for ffi.h... /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:502:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1044:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1043:in `have_header'
from extconf.rb:16:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.5 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/ffi-1.9.5/gem_make.out

Actually, this seems to be successfully answered at Installing 'Compass' via the command line receive error "extconf failed, exit code 1"
You evidently need to first install development tools (xcode-select --install), then install compass
good luck!

well you should not be installing gems globally for one thing. I would highly recommend installng rbenv and then the version of ruby you would like to have, before you install compass and other gems. Then you can install gems at a user level and don't have to worry about setting write permissions on directories outside of the users. - which appears to be the problem in this case.
Just follow the instructions here for rbenv https://github.com/sstephenson/rbenv and then install the ruby build plugin https://github.com/sstephenson/ruby-build

Just run sudo chmod go-w /usr/local/ from terminal as administrator.
This worked for me

Related

compass fails on arch

Running grunt serve which use to work I'm having this error message.
Running "compass:server" (compass) task
Warning: Command failed: compass --version
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:179:in `rescue in specs': Your bundle is locked to chunky_png (1.3.4), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of chunky_png (1.3.4) has removed it. You'll need to update your bundle to a different version of chunky_png (1.3.4) that hasn't been removed in order to install. (Bundler::GemNotFound)
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:173:in `specs'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:233:in `specs_for'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:222:in `requested_specs'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:118:in `block in definition_method'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:19:in `setup'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler.rb:99:in `setup'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/setup.rb:20:in `<top (required)>'
from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `require'
from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from /usr/bin/compass:6:in `<main>'
So on side I ran a compass --version and I obtain the same error Your bundle is locked to chunky_png (1.3.4), etc.
Trying to bundle install seems a bit useless...
$ bundle install
Could not locate Gemfile or .bundle/ directory
So I tried to reinstall ruby-compass because which compass sent me to /usr/bin/compass which is the one set by ruby-compass AUR package.
that did'nt solved the problem. Any idea around ?
solved by installing compass via pacgem
details of commands :
to install pacgem
cd ~/devel/aur.archlinux.org/ # or where ever you used to put your AUR
git clone https://aur.archlinux.org/pacgem.git
cd pacgem
cat PKGBUILD # at this point, it is recommended to personally check to PKGBUILD
makepkg -si
and answer y to all questions
install compass
pacgem compass
and answer y to all questions. It will install needed dependencies.

I get permission denied error while trying to run bundle install

I recently switched from Linux to Mac, and while trying to run bundle on one of my previous projects, I get the error below:
System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:959:in `read': Permission denied - /Library/Ruby/Gems/2.0.0/specifications/puma-2.14.0.gemspec (Errno::EACCES)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:959:in `load'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:644:in `block (2 levels) in each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:643:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:643:in `block in each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:642:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:642:in `each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:658:in `each_normal'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:669:in `_all'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:822:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:253:in `find_all'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:253:in `matching_specs'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:277:in `to_specs'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /usr/bin/bundle:22:in `<main>'
I have tried reinstalling bundler, rbenv and ruby, but I keep getting the same error. I ran the command with sudo and it works, how can I set the permission without having to use sudo
I retried with sudo now and it works. How can U make it work without sudo
To make bundler work without sudo, you should install all your gem dependencies in a local user directory (this is the recommended way)
bundle install --path vendor/bundle
Now when you run your program, bundle will find all your libraries in the new location
bundle exec ruby app.rb
If you are using git, make sure to add vendor to your .gitignore to avoid having all your gem libraries in your "new files" list.

Problems installing zeromq MacOSX

I tried to install zeromq using brew on MacOSX 10.9.5. This is the output I got:
==> Downloading http://download.zeromq.org/zeromq-3.2.3.tar.gz
######################################################################## 100.0%
==> Patching
patching file tests/test_disconnect_inproc.cpp
==> ./configure --prefix=/usr/local/Cellar/zeromq/3.2.3
==> make
==> make install
==> Caveats
To install the zmq gem on 10.6 with the system Ruby on a 64-bit machine,
you may need to do:
ARCHFLAGS="-arch x86_64" gem install zmq -- --with-zmq-dir=/usr/local/opt/zeromq
==> Summary
/usr/local/Cellar/zeromq/3.2.3: 54 files, 2.3M, built in 24 seconds
And after trying to execute the command it tells me to run (ARCHFLAGS="-arch x86_64" gem install zmq -- --with-zmq-dir=/usr/local/opt/zeromq), it tells me that it couldn't install zmq:
Fetching: zmq-2.1.4.gem (100%)
Building native extensions with: '--with-zmq-dir=/usr/local/opt/zeromq'
This could take a while...
ERROR: Error installing zmq:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb --with-zmq-dir=/usr/local/opt/zeromq
checking for zmq.h... /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:502:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1044:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1043:in `have_header'
from extconf.rb:23:in `header?'
from extconf.rb:32:in `<main>'
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/zmq-2.1.4 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/zmq-2.1.4/./gem_make.out
Does someone know what problem that is and how to resolve it?
I had a similar problem on Yosemite. I've installed zmg using port:
sudo port install zmg
followed by:
npm install zmq
and:
brew uninstall zmq

Failing to install ruby-debug-ide gem under ruby 2.1.2

I am trying to install the ruby-debug-ide gem under ruby 2.1.2 . This to debug in Rubymine.
It worked for ruby1.9.3 but not for this version.
here is the error:
1.3.5/lib/debugger/ruby_core_source/ruby-2.1.2-p95/***internal.h:209: error: expected ‘;’, ‘,’ or ‘)’ before ‘x’***
Here is the output.
I would love the ability to make sence or debug this in some way . A quick fix will also be great by the way :-)
Fetching: ruby-debug-ide-0.4.22.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug-ide:
ERROR: Failed to build gem native extension.
/Users/ohad/.rvm/rubies/ruby-2.1.2/bin/ruby mkrf_conf.rb
Installing base gem
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: Failed to build gem native extension.
/Users/ohad/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
checking for vm_core.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling breakpoint.c
compiling context.c
compiling debase_internals.c
In file included from /Users/ohad/.rvm/gems/ruby-2.1.2#v1_v2/gems/debugger-ruby_core_source-1.3.5/lib/debugger/ruby_core_source/ruby-2.1.2-p95/method.h:14,
from /Users/ohad/.rvm/gems/ruby-2.1.2#v1_v2/gems/debugger-ruby_core_source-1.3.5/lib/debugger/ruby_core_source/ruby-2.1.2-p95/vm_core.h:24,
from ./hacks.h:1,
from debase_internals.c:2:
/Users/ohad/.rvm/gems/ruby-2.1.2#v1_v2/gems/debugger-ruby_core_source-1.3.5/lib/debugger/ruby_core_source/ruby-2.1.2-p95/***internal.h:209: error: expected ‘;’, ‘,’ or ‘)’ before ‘x’***
make: *** [debase_internals.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/ohad/.rvm/gems/ruby-2.1.2#v1_v2/gems/debase-0.0.9 for inspection.
Results logged to /Users/ohad/.rvm/gems/ruby-2.1.2#v1_v2/extensions/x86_64-darwin-13/2.1.0-static/debase-0.0.9/gem_make.out
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:89:in `run'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:51:in `block in make'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:43:in `each'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:43:in `make'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:47:in `block in build'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tempfile.rb:324:in `open'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:17:in `build'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `chdir'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `block in build_extension'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `synchronize'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `build_extension'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `each'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `build_extensions'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/installer.rb:677:in `build_extensions'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/installer.rb:232:in `install'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/request_set.rb:142:in `block in install'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/request_set.rb:126:in `each'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/request_set.rb:126:in `install'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/dependency_installer.rb:389:in `install'
mkrf_conf.rb:34:in `rescue in <main>'
mkrf_conf.rb:27:in `<main>'
rake failed, exit code 1
Gem files will remain installed in /Users/ohad/.rvm/gems/ruby-2.1.2#v1_v2/gems/ruby-debug-ide-0.4.22 for inspection.
Results logged to /Users/ohad/.rvm/gems/ruby-2.1.2#v1_v2/extensions/x86_64-darwin-13/2.1.0-static/ruby-debug-ide-0.4.22/gem_make.out
Also, I failed to install with ruby rvm reinstall ruby-2.1.2 --disable-binary with this error
`dyld: Library not loaded: ##HOMEBREW_CELLAR##/openssl/1.0.1i/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/opt/openssl/bin/openssl
Reason: image not found
Failed reading certificates path for '/usr/local/opt/openssl/bin/openssl' with return code: ().
RVM autolibs is now configured with mode '2' => 'check and stop if missing',
please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]`
or visit https://rvm,, for more information.
Requirements installation failed with status: 133.`
The problem seems to be that the gem debugger-ruby_core_source can’t find the header file vm_core.h, which is part of Ruby’s source code. To install the source only (given that you have the binaries installed already) do:
$ rvm fetch ruby-2.1.2
You can also reinstall from source (a bit slower but it’s a good habit):
$ rvm reinstall ruby-2.1.2 --disable-binary
Update based on your additional error message
According to your message, you need to install OpenSSL:
$ brew install openssl
To sum up:
You can’t install debugger-ruby_core_source because it needs the
Ruby source for your Ruby version.
You can’t install the Ruby source
code with RVM because the Open SSL libraries are missing.
To remedy that type rvm autolibs homebrew so that RVM will install the missing packages if needed (you might need root permissions and enter your password when requested). This also lets RVM takes care of dependency problems from now on, you shouldn’t need to type the command again.
I had a similar issue, and installing the debugger-ruby_core_source gem manually before installing ruby-debug-ide worked.
I had this happen to me today, and solved it after running brew unlink openssl && brew link openssl --force
Hope it helps.

irb builds nokogiri for no apparent reason

I'm in Ubuntu 14.04 using ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
I type irb and suddenly I get the following
/usr/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir': Permission denied - /var/lib/gems/1.9.1/extensions/x86_64-linux/1.9.1/nokogiri-1.6.2.1 (Errno::EACCES)
from /usr/lib/ruby/1.9.1/fileutils.rb:247:in `fu_mkdir'
from /usr/lib/ruby/1.9.1/fileutils.rb:221:in `block (2 levels) in mkdir_p'
from /usr/lib/ruby/1.9.1/fileutils.rb:219:in `reverse_each'
from /usr/lib/ruby/1.9.1/fileutils.rb:219:in `block in mkdir_p'
from /usr/lib/ruby/1.9.1/fileutils.rb:205:in `each'
from /usr/lib/ruby/1.9.1/fileutils.rb:205:in `mkdir_p'
from /usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:210:in `write_gem_make_out'
from /usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:132:in `build_error'
from /usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:171:in `rescue in build_extension'
from /usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:156:in `build_extension'
from /usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:198:in `block in build_extensions'
from /usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:195:in `each'
from /usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:195:in `build_extensions'
from /usr/local/lib/site_ruby/1.9.1/rubygems/specification.rb:1436:in `block in build_extensions'
from /usr/local/lib/site_ruby/1.9.1/rubygems/user_interaction.rb:45:in `use_ui'
from /usr/local/lib/site_ruby/1.9.1/rubygems/specification.rb:1434:in `build_extensions'
from /usr/local/lib/site_ruby/1.9.1/rubygems/stub_specification.rb:60:in `build_extensions'
from /usr/local/lib/site_ruby/1.9.1/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
from /usr/local/lib/site_ruby/1.9.1/rubygems/specification.rb:925:in `block in find_inactive_by_path'
from /usr/local/lib/site_ruby/1.9.1/rubygems/specification.rb:924:in `each'
from /usr/local/lib/site_ruby/1.9.1/rubygems/specification.rb:924:in `find'
from /usr/local/lib/site_ruby/1.9.1/rubygems/specification.rb:924:in `find_inactive_by_path'
from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:185:in `try_activate'
from /usr/lib/ruby/1.9.1/irb/locale.rb:150:in `block in search_file'
from /usr/lib/ruby/1.9.1/irb/locale.rb:158:in `block in each_localized_path'
from /usr/lib/ruby/1.9.1/irb/locale.rb:167:in `each_sublocale'
from /usr/lib/ruby/1.9.1/irb/locale.rb:157:in `each_localized_path'
from /usr/lib/ruby/1.9.1/irb/locale.rb:145:in `search_file'
from /usr/lib/ruby/1.9.1/irb/locale.rb:124:in `find'
from /usr/lib/ruby/1.9.1/irb/locale.rb:108:in `load'
from /usr/lib/ruby/1.9.1/irb/locale.rb:32:in `initialize'
from /usr/lib/ruby/1.9.1/irb/init.rb:114:in `new'
from /usr/lib/ruby/1.9.1/irb/init.rb:114:in `init_config'
from /usr/lib/ruby/1.9.1/irb/init.rb:16:in `setup'
from /usr/lib/ruby/1.9.1/irb.rb:53:in `start'
from /usr/bin/irb:12:in `<main>'
So here's the /var/lib/gems/1.9.1/extensions/x86_64-linux/1.9.1/ folder listing:
bcrypt-3.1.7 ffi-1.9.3 nokogiri-1.6.3.rc1 therubyracer-0.12.1
binding_of_caller-0.7.2 json-1.8.1 pg-0.17.1 unicorn-4.8.3
debug_inspector-0.0.2 kgio-2.9.2 raindrops-0.13.0
As you can see I already have nokogiri-1.6.3.rc1, but irb, without my asking, is trying to build nokogiri-1.6.2.1. I then add print statements to both /usr/lib/ruby/1.9.1/fileutils.rb:247:in 'fu_mkdir' and /usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:210:in 'write_gem_make_out' to see what they're trying to do. I change ownership recursively to the current user for /var/lib/gems/. I then run irb and get the following.
Dir.mkdir /var/lib/gems/1.9.1/extensions/x86_64-linux/1.9.1/nokogiri-1.6.2.1
Building nokogiri using packaged libraries.
Building libxml2-2.8.0 for nokogiri.
************************************************************************
IMPORTANT! Nokogiri builds and uses a packaged version of libxml2.
If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:
gem install nokogiri -- --use-system-libraries
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
However, note that nokogiri does not necessarily support all versions
of libxml2.
For example, libxml2-2.9.0 and higher are currently known to be broken
and thus unsupported by nokogiri, due to compatibility problems and
XPath optimization bugs.
************************************************************************
Building libxslt-1.1.28 for nokogiri.
************************************************************************
IMPORTANT! Nokogiri builds and uses a packaged version of libxslt.
If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:
gem install nokogiri -- --use-system-libraries
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
************************************************************************
Dir.mkdir /var/lib/gems/1.9.1/gems/nokogiri-1.6.2.1/lib
FileUtils.mkdir_p /var/lib/gems/1.9.1/extensions/x86_64-linux/1.9.1/nokogiri-1.6.2.1
Dir.mkdir /var/lib/gems/1.9.1/extensions/x86_64-linux/1.9.1/nokogiri-1.6.2.1
I didn't ask for Nokogiri to build. At the moment I could care less about it. Why did it build Nokogiri without my asking? And why would irb stop me from continuing my work to do so?
irb works now. The /var/lib/gems/1.9.1/extensions/x86_64-linux/1.9.1/ folder now looks like
bcrypt-3.1.7 ffi-1.9.3 nokogiri-1.6.2.1 raindrops-0.13.0
binding_of_caller-0.7.2 json-1.8.1 nokogiri-1.6.3.rc1 therubyracer-0.12.1
debug_inspector-0.0.2 kgio-2.9.2 pg-0.17.1 unicorn-4.8.3
So now I have two versions of nokogiri. "Stop it irb! You're drunk!" In case you're wondering I had just now booted up my computer. Previously I had had an application build a customized Nokogiri instance. But I still don't know why this happened.

Resources