ide gem under ruby 2.1.2

I am trying to install the ruby-debug-ide gem under ruby 2.1.2 . This to debug in Rubymine.

It worked for ruby1.9.3 but not for this version. here is the error:

1.3.5/lib/debugger/ruby_core_source/ruby-2.1.2-p95/***internal.h:209: error: expected ‘;’, ‘,’ or ‘)’ before ‘x’***

Here is the output.

I would love the ability to make sence or debug this in some way . A quick fix will also be great by the way :-)

Fetching: ruby-debug-ide-0.4.22.gem (100%)
    Building native extensions.  This could take a while...
    ERROR:  Error installing ruby-debug-ide:
        ERROR: Failed to build gem native extension.

        /Users/ohad/.rvm/rubies/ruby-2.1.2/bin/ruby mkrf_conf.rb
    Installing base gem
    Building native extensions.  This could take a while...
    Building native extensions.  This could take a while...
    ERROR: Failed to build gem native extension.

        /Users/ohad/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb
    checking for vm_core.h... no
    checking for vm_core.h... no
    checking for vm_core.h... yes
    creating Makefile

    make "DESTDIR=" clean

    make "DESTDIR="
    compiling breakpoint.c
    compiling context.c
    compiling debase_internals.c
    In file included from /Users/ohad/.rvm/gems/ruby-2.1.2@v1_v2/gems/debugger-ruby_core_source-1.3.5/lib/debugger/ruby_core_source/ruby-2.1.2-p95/method.h:14,
                     from /Users/ohad/.rvm/gems/ruby-2.1.2@v1_v2/gems/debugger-ruby_core_source-1.3.5/lib/debugger/ruby_core_source/ruby-2.1.2-p95/vm_core.h:24,
                     from ./hacks.h:1,
                     from debase_internals.c:2:
    /Users/ohad/.rvm/gems/ruby-2.1.2@v1_v2/gems/debugger-ruby_core_source-1.3.5/lib/debugger/ruby_core_source/ruby-2.1.2-p95/***internal.h:209: error: expected ‘;’, ‘,’ or ‘)’ before ‘x’***
    make: *** [debase_internals.o] Error 1

    make failed, exit code 2

    Gem files will remain installed in /Users/ohad/.rvm/gems/ruby-2.1.2@v1_v2/gems/debase-0.0.9 for inspection.
    Results logged to /Users/ohad/.rvm/gems/ruby-2.1.2@v1_v2/extensions/x86_64-darwin-13/2.1.0-static/debase-0.0.9/gem_make.out
    /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:89:in `run'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:51:in `block in make'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:43:in `each'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:43:in `make'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:47:in `block in build'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tempfile.rb:324:in `open'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:17:in `build'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `chdir'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `block in build_extension'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `synchronize'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `build_extension'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `each'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `build_extensions'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/installer.rb:677:in `build_extensions'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/installer.rb:232:in `install'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/request_set.rb:142:in `block in install'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/request_set.rb:126:in `each'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/request_set.rb:126:in `install'
      /Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/dependency_installer.rb:389:in `install'
      mkrf_conf.rb:34:in `rescue in <main>'
      mkrf_conf.rb:27:in `<main>'

    rake failed, exit code 1

    Gem files will remain installed in /Users/ohad/.rvm/gems/ruby-2.1.2@v1_v2/gems/ruby-debug-ide-0.4.22 for inspection.
    Results logged to /Users/ohad/.rvm/gems/ruby-2.1.2@v1_v2/extensions/x86_64-darwin-13/2.1.0-static/ruby-debug-ide-0.4.22/gem_make.out

Also, I failed to install with ruby rvm reinstall ruby-2.1.2 --disable-binary with this error

`dyld: Library not loaded: @@HOMEBREW_CELLAR@@/openssl/1.0.1i/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/opt/openssl/bin/openssl
  Reason: image not found
Failed reading certificates path for '/usr/local/opt/openssl/bin/openssl' with return code: ().
RVM autolibs is now configured with mode '2' => 'check and stop if missing',
please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]`
or visit https://rvm,, for more information.
Requirements installation failed with status: 133.`

The problem seems to be that the gem debugger-ruby_core_source can't find the header file vm_core.h , which is part of Ruby's source code. To install the source only (given that you have the binaries installed already) do:

$ rvm fetch ruby-2.1.2

You can also reinstall from source (a bit slower but it's a good habit):

$ rvm reinstall ruby-2.1.2 --disable-binary

Update based on your additional error message

According to your message, you need to install OpenSSL:

$ brew install openssl

To sum up:

  • You can't install debugger-ruby_core_source because it needs the Ruby source for your Ruby version.
  • You can't install the Ruby source code with RVM because the Open SSL libraries are missing.
  • To remedy that type rvm autolibs homebrew so that RVM will install the missing packages if needed (you might need root permissions and enter your password when requested). This also lets RVM takes care of dependency problems from now on, you shouldn't need to type the command again.


    我有一个类似的问题,在安装ruby-debug-ide之前手动安装debugger-ruby_core_source gem。


    I had this happen to me today, and solved it after running brew unlink openssl && brew link openssl --force

    Hope it helps.

    链接地址: http://www.djcxy.com/p/80630.html

    上一篇: Google云端存储和开发的本地存储浏览器

    下一篇: 红宝石2.1.2下的ide宝石