I got this issue when I install json by gem install on windows, and the error message is:
C:\DevKit>gem install json --platform=ruby --version=1.4.6
Fetching: json-1.4.6.gem (100%)Fetching: json-1.4.6.gem
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:/Ruby193/bin/ruby.exe extconf.rb
checking for ruby/re.h... yes
checking for ruby/encoding.h... yes
creating Makefile
make "DESTDIR="
generating generator-i386-mingw32.def
compiling generator.c
generator.c:321:13: warning: 'fbuffer_free_only_buffer' defined but not used
linking shared-object json/ext/generator.so
c:/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:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.4.6 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/json- 1.4.6/ext/json/ext/generator/gem_make.out
and whatis -lmsvcrt-ruby191, Is that a lib of ruby? From the error message it says cannot find -lmsvcrt-ruby191, that is arch-criminal?
I install json, because I want to make sure DevKit is installed successfully.
Can anybody help me?
Related
I've been on this for a few hrs already googled everything. Tried tons of answers, im using ruby x64 and devkit x64 (originaly isntalled the incorect one x32 but i just deleted it and installed the correct one x64)
Cant install json or (my actual target) ruby-debug-ide -v 0.4.32
gem version = 2.4.7
ruby version =ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32]
C:\WINDOWS\system32>gem install json
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20171013-12212-1y42085.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating generator-x64-mingw32.def
compiling generator.c
linking shared-object json/ext/generator.so
c:/ruby24-x64/programing/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmp
collect2.exe: error: ld returned 1 exit status
make: *** [generator.so] Error 1
make failed, exit code 2
Gem files will remain installed in C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0 for inspection.
Results logged to C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/json-2.1.0/gem_make.out
You might want to try a cloud9 editor, and per this tutorial https://www.railstutorial.org/book/beginning
It will save you quite a bit of pain setting up your rails environment.
I've been trying to install msgpack using homebrew, and it repeatedly throw the following error:
Building native extensions. This could take a while...
ERROR: Error installing msgpack:
ERROR: Failed to build gem native extension.
current directory: /usr/local/lib/ruby/gems/2.4.0/gems/msgpack
0.5.8/ext/msgpack
/usr/local/opt/ruby/bin/ruby -r ./siteconf20170801-23901-1ar0ojr.rb extconf.rb
checking for ruby/st.h... yes
checking for st.h... yes
checking for rb_str_replace() in ruby.h... yes
creating Makefile
current directory: /usr/local/lib/ruby/gems/2.4.0/gems/msgpack-
0.5.8/ext/msgpack
make "DESTDIR=" clean
current directory: /usr/local/lib/ruby/gems/2.4.0/gems/msgpack-
0.5.8/ext/msgpack
make "DESTDIR="
compiling buffer.c
compiling buffer_class.c
compiling core_ext.c
core_ext.c:121:22: error: use of undeclared identifier 'rb_cFixnum'
rb_define_method(rb_cFixnum, "to_msgpack", Fixnum_to_msgpack, -1);
^
core_ext.c:122:22: error: use of undeclared identifier 'rb_cBignum'
rb_define_method(rb_cBignum, "to_msgpack", Bignum_to_msgpack, -1);
^
2 errors generated.
make: *** [core_ext.o] Error 1
make failed, exit code 2
Gem files will remain installed in
/usr/local/lib/ruby/gems/2.4.0/gems/msgpack-0.5.8 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-
16/2.4.0/msgpack-0.5.8/gem_make.out
Searching for the solution to this has been unfruitful. My Ruby version is 2.4.1, but I'm not sure if it's a version issue.
I found this issue in msgpack repository in Github:
https://github.com/msgpack/msgpack-ruby/issues/120
Looks like this issue was resolved in version 1.0.0.
Do you really need to use the version 0.5.8? Is it possible to update the gem version?
I installed mongo gem. But during run time it says it requires bson_ext gem needs to be installed. So i am trying to install bson_ext gem in windows 7 professional and i couldn't. i am getting the below errors while installing and so i couldn't connect Ruby to my mongo server. Caould anyone help me to resolve this. i searched all areas and i found some saying doing "gem update --system" solves the problem. But even i get error for gem update option. I am new to Ruby and Cucumber.
C:\Manimaran\Ruby>gem source
*** CURRENT SOURCES ***
http://rubygems.org/
C:\Manimaran\Ruby>gem install bson_ext
WARNING: Error fetching data: Errno::ETIMEDOUT: A connection attempt failed bec
ause the connected party did not properly respond after a period of time, or est
ablished connection failed because connected host has failed to respond. - conne
ct(2) (http://rubygems.org/specs.4.8.gz)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing bson_ext:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
checking for asprintf()... no
checking for ruby/st.h... yes
checking for ruby/regex.h... yes
checking for ruby/encoding.h... yes
creating Makefile
make
generating cbson-i386-mingw32.def
compiling bson_buffer.c
compiling cbson.c
cbson.c:25:23: fatal error: arpa/inet.h: No such file or directory
compilation terminated.
make: *** [cbson.o] Error 1
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/bson_ext-
1.11.1 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/bson_ext-1.11.1/ext/cbson/
gem_make.out
the #include in the file cbson.c should be changed into #include. Then you need to build the your own gem and install it locally
Following thread describes it perfectly:
windows: rails: error installing bson_ext
I have an error message while running sudo bundle install:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ruby/util.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling bcrypt_ext.c
compiling crypt.c
compiling crypt_blowfish.c
compiling crypt_gensalt.c
compiling wrapper.c
linking shared-object bcrypt_ext.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [bcrypt_ext.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/bcrypt-3.1.7 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/bcrypt-3.1.7/gem_make.out
An error occurred while installing bcrypt (3.1.7), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.7'` succeeds before bundling.
Then I tried to run sudo gem install bcrypt -v '3.1.7' and have below error message:
Building native extensions. This could take a while...
ERROR: Error installing bcrypt:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ruby/util.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling bcrypt_ext.c
compiling crypt.c
compiling crypt_blowfish.c
compiling crypt_gensalt.c
compiling wrapper.c
linking shared-object bcrypt_ext.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [bcrypt_ext.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/bcrypt-3.1.7 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/bcrypt-3.1.7/gem_make.out
After this, I try to run sudo gem install bcrypt, still not working. Any tips?
I had upgraded Xcode from the Mac App Store, and that caused this particular error for me.
The way to fix it in my case: run Xcode and accept the license terms, etc. Then when I ran bundle install, it compiled and installed bcrypt just fine.
I am having a problem getting my ruby system up and running. Specifically, I get the following error when trying
gem install json
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:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
make
generating parser-i386-mingw32.def
compiling parser.c
gcc.exe: CreateProcess: No such file or directory
make: *** [parser.o] Error 1
Gem files will remain installed in c:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.6.
Results logged to c:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.6.3/ext/json/ext/pa
I know that my gcc works. I don't get the same error when installing
`gem install json_pure
However, when I try a
bundle install
I get the error. I am extremely new to ruby and rails, so any help would be appreciated.
install devkit with --force option