无法安装 gem 文件



我已经用谷歌搜索了几个小时。尝试了大量的答案,我使用 ruby x64 和 devkit x64(最初是 incorect 一个 x32,但我只是删除了它并安装了正确的 x64)无法安装 json 或(我的实际目标)ruby-debug-ide -v 0.4.32宝石版本 = 2.4.7Ruby 版本 =Ruby 2.4.2P198 (2017-09-14 修订版 59899) [x64-mingw32]

C:WINDOWSsystem32>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

您可能想尝试 cloud9 编辑器,并根据本教程 https://www.railstutorial.org/book/beginning它将为您节省设置轨道环境的相当多的麻烦。

最新更新