ruby-debug-ide无法在Windows中构建gem本机扩展

时间:2016-08-24 07:05:59

标签: ruby intellij-idea ruby-debug-ide

我已经安装了debase,但是当我尝试使用gem install ruby​​-debug-ide时,它仍然无法构建gem本机扩展:

ERROR:  Error installing ruby-debug-ide-0.6.1.beta2.gem:
        ERROR: Failed to build gem native extension.

    C:/Ruby22-x64/bin/ruby.exe mkrf_conf.rb
Installing base gem
Unable to resolve dependency: user requested 'debase (> 0)'
C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/resolver.rb:439:in `resolve_for_zero'
C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/resolver.rb:350:in `resolve_for'
C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/resolver.rb:196:in `resolve'
C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/request_set.rb:358:in `resolve'
C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/dependency_installer.rb:473:in `resolve_dependencies'
C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/dependency_installer.rb:373:in `install'
mkrf_conf.rb:35:in `rescue in <main>'
mkrf_conf.rb:28:in `<main>'

rake failed, exit code 1

Gem files will remain installed in C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/ruby-debug-ide-0.6.1.beta2 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/ruby-debug-ide-0.6.1.beta2/gem_make.out`}

我真的安装了贬值。

*** LOCAL GEMS ***
actioncable (5.0.0.1)
actionmailer (5.0.0.1)
actionpack (5.0.0.1)
actionview (5.0.0.1)
activejob (5.0.0.1)
activemodel (5.0.0.1)
activerecord (5.0.0.1)
activesupport (5.0.0.1)
arel (7.1.1)
bigdecimal (1.2.6)
builder (3.2.2)
bundler (1.12.5)
coffee-rails (4.2.1)
coffee-script (2.4.1)
coffee-script-source (1.10.0, 1.8.0)
concurrent-ruby (1.0.2)
debase (0.2.2.beta8)
debase-ruby_core_source (0.9.1)
debug_inspector (0.0.2)
erubis (2.7.0)
execjs (2.7.0)
globalid (0.3.7)
httpclient (2.8.2.2)
i18n (0.7.0)
io-console (0.4.3)
jbuilder (2.6.0)
jquery-rails (4.2.1)
json (1.8.1)
loofah (2.0.3)
mail (2.6.4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.9.0, 5.4.3)
multi_json (1.12.1)
nio4r (1.2.1)
nokogiri (1.6.8 x64-mingw32)
pkg-config (1.1.7)
power_assert (0.2.2)
psych (2.0.8)
puma (3.6.0)
rack (2.0.1)
rack-test (0.6.3)
rails (5.0.0.1)
rails-dom-testing (2.0.1)
rails-html-sanitizer (1.0.3)
railties (5.0.0.1)
rake (11.2.2, 10.4.2)
rdoc (4.2.0)
sass (3.4.22)
sass-rails (5.0.6)
soap4r (1.5.8)
sprockets (3.7.0)
sprockets-rails (3.1.1)
sqlite3 (1.3.11 x64-mingw32)
test-unit (3.0.8)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.5)
turbolinks (5.0.1)
turbolinks-source (5.0.0)
tzinfo (1.2.2)
tzinfo-data (1.2016.6)
uglifier (3.0.1)
web-console (3.3.1)
websocket-driver (0.6.4)
websocket-extensions (0.1.2)

我该怎么做才能解决问题?我是否需要安装特定版本的debase?
谢谢!

2 个答案:

答案 0 :(得分:3)

我终于设法解决了这个问题:

  1. https://github.com/ruby-debug/ruby-debug-ide
  2. 下载来源
  3. 修改call = requests.post(url, data=json.dumps(payload), headers=headers) call = call.json() 并删除第ruby-debug-ide.gemspec
  4. spec.extensions << "ext/mkrf_conf.rb" unless ENV['NO_EXT']
  5. gem build ruby-debug-ide.gemspec

答案 1 :(得分:0)

对我来说,问题是将ruby可执行文件安装在绝对路径中有空格的目录中。在其他位置重新安装可立即修复。 Ruby 2.6。某些东西,Windows。