Installing ruby-debug19 locally

I am currently running Ruby 1.9.2p0 on a 32-bit Windows XP machine. Since we upgraded to Ruby 1.9, I cannot get any form of debugging to work at all. I was told that you need a new ruby-debug19 stone so that everything is in order. The problem is that my company proxy does not allow the gem dependency manager to connect to external repositories. This is normal, I’ll just download the stone itself and install it locally. Results:

ERROR:  Error installing ruby-debug19-0.11.6.gem:
    ERROR: Failed to build gem native extension.

C:/Ruby192/bin/ruby.exe extconf.rb --with-ruby-include=C:\Ruby192\include
checking for vm_core.h... no
checking for vm_core.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=C:/Ruby192/bin/ruby
    --with-ruby-dir
    --without-ruby-dir
    --with-ruby-include=${ruby-dir}/include
    --with-ruby-lib
    --without-ruby-lib=${ruby-dir}/lib
C:/Ruby192/lib/ruby/1.9.1/net/http.rb:644:in `initialize': A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - connect(2) (Errno::ETIMEDOUT)
    from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:644:in `open'
    from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:644:in `block in connect'
    from C:/Ruby192/lib/ruby/1.9.1/timeout.rb:44:in `timeout'
    from C:/Ruby192/lib/ruby/1.9.1/timeout.rb:87:in `timeout'
    from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:644:in `connect'
    from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:637:in `do_start'
    from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:626:in `start'
    from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:1160:in `request'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:239:in `block in read'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:286:in `connect'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:234:in `read'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:128:in `download'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/ruby_core_source.rb:55:in `block in create_makefile_with_core'
    from C:/Ruby192/lib/ruby/1.9.1/tempfile.rb:320:in `open'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/ruby_core_source.rb:51:in `create_makefile_with_core'
    from extconf.rb:20:in `<main>'
Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.gz


Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/linecache19-0.5.11 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/linecache19-0.5.11/ext/trace_nums/gem_make.out

, , Ruby, , script , - . , , , ? - , , ? .

+3
8

, - *.h *.inc , :

ruby -rmkmf -e 'puts Config::CONFIG["rubyhdrdir"] + "/" + "ruby-" + RUBY_VERSION.to_s + "-p" + RUBY_PATCHLEVEL.to_s'

ruby_core_source .

+8

, . , . ruby-debug19 linecache19 ruby-debug-base19 ( , ). , , . , , gem install -l, , , . .

linecache19 win32, " ", . Windows, VC6, , , dev-kit, . Windows. dev-kit .

.

, .

+3

ruby-debug Ruby 1.9 Ruby 1.9, ()

- ruby-debug , Ruby, .

, , Ruby, .

ruby_core_source,

Ruby ( ) ruby_core_source, , . 38 ruby_core_source.rb

+1

RVM,

URL-: - http://isitruby19.com/linecache19.

..

,

gem install "-l", . ...

mohnish@mohnish-desktop:~/Downloads/Diaspora_new_gems/mar10$ gem install ruby-debug19-0.11.6.gem -l -- --with-ruby-include=$rvm_path/src/ruby-1.9.2-p180/
Building native extensions.  This could take a while...
Successfully installed linecache19-0.5.12
Successfully installed ruby-debug19-0.11.6
2 gems installed
Installing ri documentation for linecache19-0.5.12...
Installing ri documentation for ruby-debug19-0.11.6...
Installing RDoc documentation for linecache19-0.5.12...
Installing RDoc documentation for ruby-debug19-0.11.6...
mohnish@mohnish-desktop:~/Downloads/Diaspora_new_gems/mar10$ ls

mohnish@mohnish-desktop:~/Downloads/Diaspora_new_gems/mar10$ gem install ruby-debug-base19-0.11.25.gem -l -- --with-ruby-include=$rvm_path/src/ruby-1.9.2-p180/. 
Building native extensions.  This could take a while...
Successfully installed ruby-debug-base19-0.11.25
1 gem installed
Installing ri documentation for ruby-debug-base19-0.11.25...
Installing RDoc documentation for ruby-debug-base19-0.11.25...
mohnish@mohnish-desktop:~/Downloads/Diaspora_new_gems/mar10$ 

Ruby (136 180 ..). ruby-debug-base19-0.11.25, .

+1

ruby ​​1.9.3 exe installer. , . "ruby_core.rb". .

, .

  #
  # Download the headers
  #
  uri_path = "http://ftp.ruby-lang.org/pub/ruby/1.9/" + ruby_dir + ".tar.gz"
  Tempfile.open("ruby-src") { |temp|

    temp.binmode
    uri = URI.parse(uri_path)
    uri.download(temp)

    tgz = Zlib::GzipReader.new(File.open(temp, "rb"))

    FileUtils.mkdir_p(dest_dir)
    Dir.mktmpdir { |dir|
      inc_dir = dir + "/" + ruby_dir + "/*.inc"
      hdr_dir = dir + "/" + ruby_dir + "/*.h"
      Archive::Tar::Minitar.unpack(tgz, dir)
      FileUtils.cp(Dir.glob([ inc_dir, hdr_dir ]), dest_dir)
    }
  }

, , "ruby_dir" .

, , IRB .

      inc_dir = dir + "/" + ruby_dir + "/*.inc"
      hdr_dir = dir + "/" + ruby_dir + "/*.h"

, dir ( ) ruby_dir, .

!

+1

Gem . :

        --source URL                 Use URL as the remote source for gems
    -p, --[no-]http-proxy [URL]      Use HTTP proxy for remote operations
0

OSX 10.6.8 rvm, gem install ruby-debug19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.2-p180/
ruby-1.9.2... ,

0

$ echo $rvm_path/src/$(rvm tools strings) 
$ rvm @global gem install ruby-debug19 -- --with-ruby-include=$rvm_path/src/$(rvm tools strings)

http://isitruby19.com/linecache19

0

Source: https://habr.com/ru/post/1774616/


All Articles