user1510508
user1510508

Reputation:

Attempting to install libv8, "failed to build gem native extension"

I am using W7 64bit. Simply put, when I enter:

C:\Sites>gem install libv8

I get this result:

Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing libv8:
ERROR: Failed to build gem native extension.

    C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
creating Makefile
which: no gmake in ("my PATH is here, and as far as I know it should include everything I need")
/usr/bin/env: python: No such file or directory
C:\RailsInstaller\DevKit\bin\make.EXE: *** [out/Makefile.ia32] Error 127
Using compiler: C:\RailsInstaller\DevKit\mingw\bin\g++.EXE
GYP_GENERATORS=make \
    build/gyp/gyp --generator-output="out" build/all.gyp \
                  -Ibuild/standalone.gypi --depth=. \
                  -Dv8_target_arch=ia32 \
                  -S.ia32 -Dhost_arch=ia32


Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
.1/gems/libv8-3.11.8.3 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-3.1
1.8.3/ext/libv8/gem_make.out

Uninstalling and reinstalling does not work.

I'm trying to install libv8 because it's a dependency for twitter-bootstrap-rails.

EDIT: As I said, I'm on Windows, and I'm realizing now that there's a filepath listed in this error as /usr/bin/env. So that's weird.

Upvotes: 12

Views: 20365

Answers (3)

Karen Lundgren
Karen Lundgren

Reputation: 81

I had this problem, and @xiy above led me to the answer. Had to change

gem 'therubyracer'

to

gem 'therubyracer', :platforms => :ruby

as Windows does not need or like that gem.

Upvotes: 8

Hugo Logmans
Hugo Logmans

Reputation: 2252

The solution is to install version .0

gem install libv8 --version 3.11.8.0

until this is fixed, as I experienced this, too

Upvotes: 19

stevedbrown
stevedbrown

Reputation: 8934

I had the same windows problem that you described with:

gem 'twitter-bootstrap-rails'

When I switched this the version from github:

gem 'twitter-bootstrap-rails', :github => 'seyhunak/twitter-bootstrap-rails'

No problem. Give that a shot.

Upvotes: 1

Related Questions