问题
I have a website developed with was RoR v 4.2.4 on MAC which needs some adaptions and I'm trying to get in running on my windows 10 (because I don't have a MAC).I was not successfull with the rails installer and rails 5.0.
After a lot of pain installing RoR 4.2.4 with ruby 2.2.6 I managed to install nearly all missing gems using bundle check
, bundle install
and gem install xyz -v 0.0...
. But now I'm really stuck with the last 2:
therubyracer and libv8
What I tried:
Install libv8 with gem install libv8 -v 3.16.14.11 -- --with-system-v8
and also the therubyracer-for-windows which is mentioned here.
Modify the gemfile.lock to get rid of the dependencies like:
group :production do
gem 'therubyracer'
end
and tried bundle install --without production
. But then I get an error when starting the server.
At the moment bundle check
says that therubyracer v 0.12.2 is the last missing gem. libv8 is installed with --with-system-v8
. gem list
says libv8 (3.16.14.11) and therubyracer (0.11.0b) is installed but the systems does not seems to find therubyracer because: therubyracer -v
does not work. Furthermore bundle install
give me the follwing error:
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.
This error is at least similar to all the ones I get before, when trying to install therubyracer after I installed libv8 with --with-system-v8
.
Sorry if this information is a bit chaotic, but I tried so many things over about a day now and was not always 100% sure what I doing :)...quite hard to summarizes as much as possible. If there is important information missing, let me know.
By the way: I followed this guide as good as possible. Creating/Developping a new website with rails new blog
and running the server for it works perfectly...the problem is only with the existing website I have to complete.
Can someone help me? Is there any way to get the website running on my windows pc? Thanks!
来源:https://stackoverflow.com/questions/41790401/rails-on-windows-install-therubyracer-libv8-working-on-a-website-designed-o