我试图在Windows 7 64位的Ruby on Rails项目中运行bundle install
,但由于therubyracer
gem 。我在Ubuntu中开发它,但我需要将它作为Windows 7计算机中的产品运行。Windows 7中的Ruby on Rails 4:使用错误的therubyracer gem安装的Bundle安装
搜索后,我发现我应该在这里使用这个宝石:https://github.com/eakmotion/therubyracer_for_windows/blob/master。它似乎已经在我的宝石中安装了therubyracer-0.11.0beta1-x86-mingw32
。我还安装使用gem install libv8 -v '3.16.14.7' -- --with-system-v8
的libv8,如gem install libv8 --version '3.11.8.17' on ruby (windows)
不过的建议,我遵循宝石的安装说明bundle install
仍尝试安装therubyracer
宝石(0.12.1版本),即使在。所以,我的问题是:我怎样才能使用我手动安装的therubyracer gem来运行软件包安装?
版本:2.1.5红宝石,导轨4.1.8,使用Rails Installer安装的http://www.railsinstaller.org/en
的Gemfile中的相关线路:
gem "therubyracer"
gem "less-rails"
gem "twitter-bootstrap-rails"
如果我对"therubyracer_for_windows"
交换"therubyracer"
,我得到一个错误消息Could not find gem 'therubyracer_for_windows (>= 0) ruby' in the gems available on this machine.
当我尝试做一个bundle install
。
为bundle install
错误消息:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ther
ubyracer-0.12.1/ext/v8
C:/RailsInstaller/Ruby2.1.0/bin/ruby.exe -r ./siteconf20160211-944-u6p7vs.rb ext
conf.rb
checking for main() in -lpthread... no
checking for v8.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/RailsInstaller/Ruby2.1.0/bin/ruby
--with-pthreadlib
--without-pthreadlib
--enable-debug
--disable-debug
--with-v8-dir
--without-v8-dir
--with-v8-include
--without-v8-include=${v8-dir}/include
--with-v8-lib
--without-v8-lib=${v8-dir}/lib
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/ext/libv8/l
ocation.rb:50:in `configure': You have chosen to use the version of V8 found on
your system (Libv8::Location::System::NotFoundError)
and *not* the one that is bundle with the libv8 rubygem. However,
it could not be located. please make sure you have a version of
v8 that is compatible with 3.16.14.7 installed. You may
need to special --with-v8-dir options if it is in a non-standard
location
thanks,
The Mgmt
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.
7/lib/libv8.rb:7:in `configure_makefile'
from extconf.rb:32:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/t
herubyracer-0.12.1/mkmf.log
对于我所记得的,我试图做到这一点,但也许我做了一个错误的therubyracer版本。只要我可以,我会再试一次。 在此先感谢! –
@BrianHellekin我已经遇到了一个同事的Windows机器,但即使得到它建立后,我得到一些崩溃运行任何引导轨道代码,试图包括V8。最终我只是放弃了,并用了一个vm –
我再次尝试,没有成功。当我尝试最后一次放弃时,我却成功地运行了一台运行Ubuntu或CentOS的虚拟机 - 即使Cygwin失败了...... –