1

When attempting to install gem I am getting following error

C:\xampp\htdocs\mg>gem install therubyracer
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
ERROR: Failed to build gem native extension.
C:/RailsInstaller/Ruby2.1.0/bin/ruby.exe -r ./siteconf20150527-5032-1urwkwd.
rb extconf.rb
creating Makefile
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/ext/libv8/b
uilder.rb:68:in `setup_python!': libv8 requires python 2 to be installed in orde
r to build, but it is currently not available (RuntimeError)
        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.
7/ext/libv8/builder.rb:52:in `block in build_libv8!'
        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.
7/ext/libv8/builder.rb:49:in `chdir'
        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.
7/ext/libv8/builder.rb:49:in `build_libv8!'
        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.
7/ext/libv8/location.rb:24:in `install!'
        from extconf.rb:7:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1
.0/gems/libv8-3.16.14.7 for inspection.
Results logged to C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/extensions/x86
-mingw32/2.1.0/libv8-3.16.14.7/gem_make.out

I have tried adding this in Gemfile

gem 'therubyracer',
gem 'less-rails

Tried

gem uninstall libv8
gem install therubyracer -v=0.10.1

Everything above failed and therubyracer never installed.

Richard Hamilton
  • 25,478
  • 10
  • 60
  • 87
webDev
  • 135
  • 3
  • 13

1 Answers1

1

Unfortunately, the rubyracer gem does not work on Windows. See this

https://github.com/cowboyd/libv8/issues/133

Richard Hamilton
  • 25,478
  • 10
  • 60
  • 87
  • I have removed both gems 'therubyracer', 'less-rails' coz I don't need them, my bundle got installed successfully but getting errors saying "LoadError - cannot load such file -- less" – webDev May 27 '15 at 16:42
  • http://stackoverflow.com/questions/13888381/ruby-on-rails-error-cannot-load-such-file-less – Richard Hamilton May 27 '15 at 16:59