【问题标题】:therubyracer not installing on Windowstherubyracer 未在 Windows 上安装
【发布时间】:2015-05-27 16:17:55
【问题描述】:

尝试安装 gem 时出现以下错误

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

我已经尝试在 Gemfile 中添加这个

gem 'therubyracer',
gem 'less-rails

试过

gem uninstall libv8
gem install therubyracer -v=0.10.1

上面的一切都失败了,rubyracer 从未安装过。

【问题讨论】:

标签: ruby-on-rails ruby windows rubygems therubyracer


【解决方案1】:

很遗憾,rubyracer gem 在 Windows 上不起作用。看到这个

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

【讨论】:

  • 我已经删除了两个 gem 'therubyracer', 'less-rails' 因为我不需要它们,我的包已成功安装,但出现错误提示“LoadError - 无法加载此类文件 - 少”
猜你喜欢
  • 1970-01-01
  • 2013-10-08
  • 1970-01-01
  • 2015-03-26
  • 2012-03-26
  • 1970-01-01
  • 2012-10-27
  • 2012-08-24
  • 2012-08-31
相关资源
最近更新 更多