Skip to content

Instantly share code, notes, and snippets.

@dchelimsky
Created June 19, 2011 21:14
Show Gist options
  • Save dchelimsky/1034765 to your computer and use it in GitHub Desktop.
Save dchelimsky/1034765 to your computer and use it in GitHub Desktop.
What does this mean?
$ which ruby
/Users/david/.rvm/rubies/ruby-1.8.6-p420/bin/ruby
$ gem install ruby-debug
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug:
rbx-require-relative requires Ruby version ~> 1.8.7.
# why is anything rbx related coming into play in an mri 1.8.6 env?????
@beho
Copy link

beho commented Jul 24, 2011

Hi! Any luck with this problem ? Encountered the same today, although a few months ago ruby-debug installed ok on 1.8.6.

@dchelimsky
Copy link
Author

The problem was an upstream dependency. ruby-debug-0.10.4 depends on ruby-debug-base-0.10.4, which depends on linecache >= 0.3, and this is where the problem emerges. linecache-0.46 depends specifically on rbx-require-relative, whereas linecache-0.45 does not. So to resolve the problem, install linecache-0.45 (and/or specify it in a Gemfile) before you try to install ruby-debug. When rubygems sees it on the system, it will satisfy ruby-debug-base's requirement of linecache >= 0.3 and not try to install linecache-0.46.

@bitbuerster
Copy link

@dchelimsky: Forgive me my ignorance, but as I am new to Ruby:

to resolve the problem, install linecache-0.45
How to do this? -A simple "gem install linecache" results in the very same error message as beho mentioned (I am also working with v1.9.2p290). tnx

Edit: Seems there is a more underlying problem, at least that's what the "Can't handle 1.9.x yet" below indicates to me (?). So should I delete the whole 1.9.2 stuff and revert to an earlier version?

C:\Ruby192>gem install ruby-debug
ERROR: Error installing ruby-debug:
rbx-require-relative requires Ruby version ~> 1.8.7.

C:\Ruby192>gem list

*** LOCAL GEMS ***

columnize (0.3.4)
minitest (1.6.0)
rake (0.8.7)
rdoc (2.5.8)

C:\Ruby192>gem install linecache -v 0.45
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing linecache:
ERROR: Failed to build gem native extension.

    C:/Ruby192/bin/ruby.exe extconf.rb

Can't handle 1.9.x yet
*** 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

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

C:\Ruby192>

@piousbox
Copy link

or gem install ruby-debug19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment