ruby-debug install error: failed to build gem native extension

前端 未结 8 1973
忘了有多久
忘了有多久 2021-01-30 02:46

I\'m running 1.9.2 with rails 3.

I\'m using rvm.

I did:

sudo gem install ruby-gem

and got:

Building native exte         


        
相关标签:
8条回答
  • 2021-01-30 02:54

    In your gemfile, change your ruby-debug line to this:

    gem 'ruby-debug19', :require => 'ruby-debug'
    

    My source is http://dirk.net/2010/04/17/ruby-debug-with-ruby-19x-and-rails-3-on-rvm/

    0 讨论(0)
  • 2021-01-30 02:54

    just use this one:

    [sudo] gem update --system 
    

    Solution comes from http://rubygems.org/pages/download

    0 讨论(0)
  • 2021-01-30 02:56

    The problem here can be that the install script is going off to get the Ruby Header files over the web (to build the debugger gem against) but doesn't find them for the particular patch-level of Ruby you're after. This is what's going on in the output line

    Looking for http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p14.tar.gz and all I got was a 404! (URI::NotFoundError)
    

    As a solution you can point to your local copy of the Ruby source which rvm has already used to build ruby on your machine. Here goes...

    gem install ruby-debug19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.2-head/
    

    Many thanks to Dirk at the following link which helped solve this

    • http://dirk.net/2010/04/17/ruby-debug-with-ruby-19x-and-rails-3-on-rvm/
    0 讨论(0)
  • 2021-01-30 02:57

    Installing gem ruby-debug-base19x also failed due to connection problems by using cntlm proxy and "--with-ruby-include" didn't worked for me. Installing the gem without a proxy worked smoothly.

    0 讨论(0)
  • 2021-01-30 03:06

    For windows, search your ruby dir for vm_core.h and then use that dir as your include path. For me, that's

    gem install ruby-debug-base19 -- --with-ruby-include=C:\JRuby\lib\native\include\ruby-1.9.3-p392
    

    Then I had to check:

    C:\JRuby\lib\ruby\gems\shared\gems\linecache19-0.5.12\ext\trace_nums\gem_make.out
    

    and move ruby/ruby.h into the include directory above.

    Now I have some other error, fix it a bit later...

    0 讨论(0)
  • 2021-01-30 03:12

    the ruby-debug gem is not compatible to Ruby 1.9.2 and later . replace gem 'ruby-debug19' with following You need use the gem ruby-debug19 So change in your Gemfile to use this one

    gem 'ruby-debug19'

    0 讨论(0)
提交回复
热议问题