Ruby-on-rails – bundle install / update: libv8 (therubyracer) installation fails (with native extensions)

gemruby-on-rails

I recently wanted to update my gem bundle but ran into installation problems with libv8 (requirement for therubyracer):

Installing libv8 (3.3.10.3) with native extensions /usr/local/rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:552:in `rescue in block in build_extensions': ERROR: Failed
 to build gem native extension. (Gem::Installer::ExtensionBuildError)

        /usr/local/rvm/rubies/ruby-1.9.3-head/bin/ruby extconf.rb 
Checking for Python...*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

I have found the issue report on therubyracer github site and it suggests to uninstall and reinstall libv8, but this does not work on my Ubuntu 11.04 machine. Any ideas – or am I stuck with the old version for a while?

Best Answer

Try that one for a little while:

gem 'therubyracer'
gem 'libv8', '3.16.14.3'

Should help.

Also it's better with a new bundler: gem install bundler --pre

Related Topic