0

我有一个在 MAC 上使用 RoR v 4.2.4 开发的网站,需要一些调整,我正试图在我的 Windows 10 上运行(因为我没有 MAC)。我没有成功使用 rails 安装程序和轨道 5.0。

在使用 ruby​​ 2.2.6 安装 RoR 4.2.4 经历了很多痛苦之后,我设法使用bundle check,bundle installgem install xyz -v 0.0.... 但现在我真的坚持最后两个: therubyracerlibv8

我尝试了什么:

使用此处gem install libv8 -v 3.16.14.11 -- --with-system-v8提到的 therubyracer-for-windows安装 libv8 。

修改 gemfile.lock 以摆脱依赖项,例如:

group :production do
  gem 'therubyracer'
end

并尝试过bundle install --without production。但是在启动服务器时出现错误。

目前bundle check说 therubyracer v 0.12.2 是最后一个缺失的宝石。libv8 与--with-system-v8. gem list说 libv8 (3.16.14.11) 和 therubyracer (0.11.0b) 已安装,但系统似乎没有找到 therubyracer,因为:therubyracer -v不起作用。此外bundle install,给我以下错误:

C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20170122-10664-jwvn48.rb extconf.rb
--with-v8-dir=/usr/local/opt/v8-315
checking for main() in -lpthread... yes
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:/Ruby22-x64/bin/$(RUBY_BASE_NAME)
        --with-pthreadlib
        --without-pthreadlib
        --enable-debug
        --disable-debug
        --with-v8-dir
        --with-v8-include
        --without-v8-include=${v8-dir}/include
        --with-v8-lib
        --without-v8-lib=${v8-dir}/lib
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.11/ext/libv8/location.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.11 installed. You may
need to special --with-v8-dir options if it is in a non-standard
location

thanks,
The Mgmt

from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.11/lib/libv8.rb:7:in
`configure_makefile'
        from extconf.rb:32:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/therubyracer-0.12.2 for inspection.
Results logged to
C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/therubyracer-0.12.2/gem_make.out

An error occurred while installing therubyracer (0.12.2), and Bundler cannot
continue.
Make sure that `gem install therubyracer -v '0.12.2'` succeeds before bundling.

这个错误至少与我之前遇到的所有错误相似,在我安装 libv8 后尝试安装 therubyracer 时--with-system-v8

抱歉,如果这些信息有点混乱,但我现在已经尝试了很多事情,但并不总是 100% 确定我在做什么:)……很难尽可能地总结。如果缺少重要信息,请告诉我。

顺便说一句:我尽可能地遵循了本指南。使用服务器创建/开发一个新网站rails new blog并运行它可以完美运行......问题仅在于我必须完成的现有网站。

有人能帮我吗?有什么方法可以让网站在我的 Windows 电脑上运行?谢谢!

4

0 回答 0