ruby-on-rails - working - ruby gems




libv8(3.11.8.17) bundle install error on Mac (4)

Do:

gem install rmagick -v '2.13.2'
gem install libv8 -v 3.11.8.17 -- --with-system-v8

I upgraded ruby to 1.9.3, and now I can't get my server to start. When I run bundle install, it says

An error occurred while installing libv8 (3.11.8.17), and Bundler cannot continue.
Make sure that `gem install libv8 -v '3.11.8.17'` succeeds before bundling.

When I try to install that gem, it says

ERROR:  Error installing libv8:
        ERROR: Failed to build gem native extension.

        /Users/Erica/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.7.1
Unable to find a compiler officially supported by v8.
It is recommended to use GCC v4.4 or higher
Using compiler: g++
Unable to find a compiler officially supported by v8.
It is recommended to use GCC v4.4 or higher

I'm an HTML/CSS coder, not really a Ruby developer, so any thoughts are really appreciated.


I encountered this problem a few times already, first thing I'd try is to (re)install command line tools. Normally should work.

Another attempt that succeeded once was uninstalling libv8, and then installing it again. It takes ages...


I resolved this issue by using the following command:

gem install libv8 -v 3.11.8.17 -- --with-system-v8

It works with RVM on Mavericks.

https://.com/a/19667419/763744


This simple solution worked for me:

$ gem uninstall libv8 # select "All Versions" if prompted
$ gem install libv8




bundler