Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails on windows - install issue

I'm trying to install ruby on a Windows box and am having an issue. I have gotten up to this point when I start getting errors, and I'm completely new to anything other than PHP for web development. Help appreciated!

EDIT I'm following the instructions here for wamp:

http://www.alexbernard.fr/fichiers/blog/Installer-Ruby-On-Rails-sur-un-Wamp-Server.pdf

./gem install rails --include-dependencies

Output:

INFO:  `gem install -y` is now default and will be removed
INFO:  use --ignore-dependencies to install only the gems you list
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing rails:
        ERROR: Failed to build gem native extension.
        C:/wamp/ruby/bin/ruby.exe extconf.rb
creating Makefile
make
generating generator-x64-mingw32.def
compiling generator.c
make: x86_64-w64-mingw32-gcc: Command not found
make: *** [generator.o] Error 127
Gem files will remain installed in C:/wamp/ruby/lib/ruby/gems/2.0.0/gems/json-1.8.0 for inspection.
Results logged to C:/wamp/ruby/lib/ruby/gems/2.0.0/gems/json-1.8.0/ext/json/ext/generator/gem_make.out
like image 879
carbide20 Avatar asked May 16 '13 04:05

carbide20


1 Answers

From the output shown above, I assume the following:

  • Installed Ruby 2.0.0 x64 (64bits)
  • Installed some DevKit from RubyInstaller page

Now, as explained here, for 64bits Ruby you need 64bits DevKit.

From the error in the output:

make: x86_64-w64-mingw32-gcc: Command not found

It is clear you didn't install the right DevKit.

Please remove the DevKit installed, download the correct one (as indicated in the link above and in RubyInstaller downloads page) and install again.

You will require to use ruby dk.rb install --force (note the --force option) to override the previous DevKit installation.

As for the the deprecation error, --include-dependencies is no longer required. I recommend you use as installation reference a modern Ruby/Rails guide.

like image 175
Luis Lavena Avatar answered Sep 21 '22 06:09

Luis Lavena