2

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/
DBelge
  • 21
  • 2
  • 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.out` – Neil Slater Jan 10 '14 at 12:41
  • 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 Jan 10 '14 at 12:48
  • 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 Jan 10 '14 at 12:59
  • I obtain the same error message when I launch the installation with current dir on C: – DBelge Jan 10 '14 at 13:06
  • 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 Jan 10 '14 at 13:08
  • I manage to install other gems without any problems. But, I obtain the same error when I try to install "rmagick" or "rails" for exemple. – DBelge Jan 10 '14 at 13:39
  • the gem sourse stay in `C:/Ruby200-x64/Ruby200-x64/lib/ruby/gems/2.0.0/gems/narray-0.6.0.8`. show list of that folder. – Малъ Скрылевъ Jan 10 '14 at 16:24
  • In this dirctory in find one directory : src and 6 files : Change.Log, MANIFEST, README.en, README.ja, SPEC.en and SPEC.ja – DBelge Jan 14 '14 at 12:32

1 Answers1

0

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
Matt Clegg
  • 584
  • 1
  • 4
  • 16