therubyracer not installing on Windows

浪尽此生 提交于 2019-12-24 17:56:01

问题


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.


回答1:


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

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



来源:https://stackoverflow.com/questions/30487976/therubyracer-not-installing-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!