0

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!

Community
  • 1
  • 1
CaptIglu
  • 93
  • 8
  • 1
    Haven't seen that specific error. But from spending an awful lot of time trying to get a passable Rails development environment working on other devs Windows machines, my recommendation would be to just set up either a virtual machine, use a service like Cloud9 or CodeAnywhere or - for long term - set up Docker. Depending on how much you're planning to work with Rails you might even want to think about a dual-boot setup. Recently a colleague tried the Win10 Linux subsystem, but we ran into memory limits, so I can't recommend it. – Marcus Ilgner Jan 22 '17 at 12:52
  • Thanks! Ok, it seems to be the only possible way(?)...or does anyone has any other idea. I would prefer to do it on windows :-/ – CaptIglu Jan 25 '17 at 14:15
  • 1
    Unfortunately, it has been my personal experience that in the long run, Windows-based Rails development always causes some problem or another. Once you solve one problem, another pops up or two weeks later a new gem version is released and you're back tearing at your hair due to some new problem. We introduced a Docker Machine-based setup for a new, Windows-using colleague last week and are quite satisfied with it so far. – Marcus Ilgner Jan 25 '17 at 16:14
  • Ok, once again, Thanks a lot for your advice :)!!! – CaptIglu Jan 26 '17 at 07:33

0 Answers0