Reputation: 3878
Hi i got this error while bundle install...
Installing therubyracer (0.10.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/rajendran/.rvm/rubies/ruby-1.9.3-p374/bin/ruby extconf.rb
*** 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.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/rajendran/.rvm/rubies/ruby-1.9.3-p374/bin/ruby
extconf.rb:15:in `<main>': undefined method `include_path' for Libv8:Module (NoMethodError)
Gem files will remain installed in /home/rajendran/.rvm/gems/ruby-1.9.3-p374/gems/therubyracer-0.10.1 for inspection.
Results logged to /home/rajendran/.rvm/gems/ruby-1.9.3-p374/gems/therubyracer-0.10.1/ext/v8/gem_make.out
An error occurred while installing therubyracer (0.10.1), and Bundler cannot continue.
Make sure that `gem install therubyracer -v '0.10.1'` succeeds before bundling.
how can i resolve this..?
Note: OS - Ubuntu 12.10
Upvotes: 17
Views: 17159
Reputation: 21549
another solution without reinstallation. (in case other Rails applications use a different version) :
1.list the installed gem versions:
$ gem list -l therubyracer
*** LOCAL GEMS ***
therubyracer (0.12.0)
2.modify your Gemfile to use one of the installed gems:
# Gemfile
gem 'therubyracer', '0.12.0', platforms: :ruby
done. now try 'bundle install' will give you a success notice.
Upvotes: 1
Reputation: 788
sudo apt-get install g++ did the job ...
hope it'll helps someone
Upvotes: 1
Reputation: 4895
Similar to @Sri, but a bit different, so paste it in not to forget it: os - xubuntu 12.10
Upvotes: 4
Reputation: 4636
You can try like the following:
$ gem uninstall libv8
$ gem install therubyracer
It makes working mine when i got the error.
P.S
you need to mention your OS
Upvotes: 46