Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Errors installing gems with native extensions #183

Closed
theCrab opened this Issue · 2 comments

2 participants

@theCrab

Hi
I am on Windows Vista and have installed Ruby using the Rails Installer. That was okay.

Now when I try installing any gem that requires building with native extensions everything fails with the error below:

C:\Windows\system32>gem install json --platform=ruby
Fetching: json-1.8.0.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing json:
        ERROR: Failed to build gem native extension.

    C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
creating Makefile

make "DESTDIR="
generating generator-i386-mingw32.def
compiling generator.c
linking shared-object json/ext/generator.so
c:/railsinstaller/devkit/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/
bin/ld.exe: cannot find -lmsvcrt-ruby191
collect2: ld returned 1 exit status
make: *** [generator.so] Error 1

Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
.1/gems/json-1.8.0 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/json-1.8.
0/ext/json/ext/generator/gem_make.out

Any reason why this is so?

Thanks

@luislavena
Owner

Hello @theCrab, did you update RubyGems to version 2.0.x?

The issue is similar to the problem reported here: rubygems/rubygems#594

For Ruby 1.9.3, downgrading to 1.8.25 should solve the issue:

gem update --system 1.8.25

Let us know if that fix your issue.

Thank you.

@theCrab

@luislavena That seams to have fixed the issue. Thanks

@theCrab theCrab closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.