2
votes

I'm trying to install the NArray gem for Ruby to do some math functions. I'm running Ruby version 2.0.0p353 [x64-mingw32] on Windows with gem 2.014

When I attempt to install the NArray gem, it produces the following error:

D:\DocPerso\Workspace Ruby>gem install narray

Temporarily enhancing PATH to include DevKit...

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

ERROR: Error installing narray:

ERROR: Failed to build gem native extension.

C:/Ruby200-x64/Ruby200-x64/bin/ruby.exe extconf.rb

C:/Ruby200-x64/Ruby200-x64/bin/ruby.exe: No such file or directory -- extconf.rb (LoadError)

Gem files will remain installed in C:/Ruby200-x64/Ruby200-x64/lib/ruby/gems/2.0. 0/gems/narray-0.6.0.8 for inspection.

Results logged to C:/Ruby200-x64/Ruby200-x64/lib/ruby/gems/2.0.0/gems/narray-0.6 .0.8/src/gem_make.out

I've googled, with no luck whatsoever.

Her you find what I obtain with gem env :

RubyGems Environment:

  • RUBYGEMS VERSION: 2.0.14

  • RUBY VERSION: 2.0.0 (2013-11-22 patchlevel 353) [x64-mingw32]

  • INSTALLATION DIRECTORY: C:/Ruby200-x64/Ruby200-x64/lib/ruby/gems/2.0.0

  • RUBY EXECUTABLE: C:/Ruby200-x64/Ruby200-x64/bin/ruby.exe

  • EXECUTABLE DIRECTORY: C:/Ruby200-x64/Ruby200-x64/bin

  • RUBYGEMS PLATFORMS:

  • ruby

  • x64-mingw32

  • GEM PATHS:
- C:/Ruby200-x64/Ruby200-x64/lib/ruby/gems/2.0.0
  • GEM CONFIGURATION:
- :update_sources => true

- :verbose => true

- :backtrace => false

- :bulk_threshold => 1000
  • REMOTE SOURCES:
- https://rubygems.org/
1
Anything relevant in the log: C:/Ruby200-x64/Ruby200-x64/lib/ruby/gems/2.0.0/gems/narray-0.6.0.8/src/gem_make.outNeil Slater
not interesting for me but I'm a newbie : C:/Ruby200-x64/Ruby200-x64/bin/ruby.exe extconf.rb C:/Ruby200-x64/Ruby200-x64/bin/ruby.exe: No such file or directory -- extconf.rb (LoadError)DBelge
The missing file is effectively a makefile generator. It isn't missing, just not where gem expects it. I wonder if the Ruby scripts are unable to change drive automatically, so it's trying to cd to the temporary build folder on C:, but stuck on D: - does the fault happen if you run the install starting from a prompt with current dir on C: ?Neil Slater
I obtain the same error message when I launch the installation with current dir on C:DBelge
I don't know the fault then, sorry. It's a gem I use a lot though, so can confirm the version you are trying to install is not faulty in other environments. In fact I happened to re-install it this morning (but on a Mac, not Windows).Neil Slater

1 Answers

0
votes

The instructions here worked for me.

AutoRun interferes with Ruby messing with child process executing and by result, affecting gem installation.

For the lazy; remove it with the following commands:

REG DELETE "HKCU\Software\Microsoft\Command Processor" /v AutoRun
REG DELETE "HKLM\Software\Microsoft\Command Processor" /v AutoRun