0
votes

Building native extensions. This could take a while...

ERROR: Error installing rails: ERROR: Failed to build gem native extension.

C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20160716-3500-cejnk5.rb extconf.rb

Invalid argument - C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20160716-3500-cejnk5. rb extconf.rb 2>&1

Gem files will remain installed in C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/websoc ket-driver-0.6.4 for inspection.

Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0 /websocket-driver-0.6.4/gem_make.out

1

1 Answers

0
votes

It could be many things as Windows is quite finicky to run Rails in. Off the top of my head:

  1. Did you accidentally install the 64 bit version of Ruby or Rails when you needed 32 bit? You can test by typing in ruby -v in the command line and seeing if your version is i386 or x64 as well as check your system information to see if your system is 32 or not. You can get different versions of Ruby here: http://rubyinstaller.org/downloads
  2. Is the link to C:/Ruby22-x64/bin/ruby.exe in your Environment variable path? Environment variable path
  3. Are you installing a version of the Rails Gem that doesn't work well with Windows or your current system setup? It might be worth trying gem install rails -v 4.1.8 (which works on my windows setup) or other specific versions and see if one works.