Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add ruby-debug to load path by adding cli to require_paths in gemspec #4

Closed
cgriego opened this Issue · 2 comments

3 participants

@cgriego

One of the differences I noticed in debugger is that ruby-debug is not in the load path. Some projects that integrate with ruby-debug expect this file, such as RSpec's --debug flag which requires ruby-debug and then starts the debugger.

The difference is that ruby-debug19 adds s.require_paths = ["cli"] to its gemspec, and cli is where the ruby-debug file lives.

Following is the full ruby-debug19 gemspec after installing the gem on my machine. This is different form the gemspec in the upstream repository, but looks like it comes from the Rakefile.

# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
  s.name = "ruby-debug19"
  s.version = "0.11.6"

  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
  s.authors = ["Kent Sibilev", "Mark Moseley"]
  s.date = "2009-09-01"
  s.description = "A generic command line interface for ruby-debug."
  s.email = "mark@fast-software.com"
  s.executables = ["rdebug"]
  s.files = ["bin/rdebug"]
  s.homepage = "http://rubyforge.org/projects/ruby-debug19/"
  s.rdoc_options = ["--charset=UTF-8"]
  s.require_paths = ["cli"]
  s.required_ruby_version = Gem::Requirement.new(">= 1.8.2")
  s.rubyforge_project = "ruby-debug19"
  s.rubygems_version = "1.8.15"
  s.summary = "Command line interface (CLI) for ruby-debug-base"

  if s.respond_to? :specification_version then
    s.specification_version = 3

    if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
      s.add_runtime_dependency(%q<columnize>, [">= 0.3.1"])
      s.add_runtime_dependency(%q<linecache19>, [">= 0.5.11"])
      s.add_runtime_dependency(%q<ruby-debug-base19>, [">= 0.11.19"])
    else
      s.add_dependency(%q<columnize>, [">= 0.3.1"])
      s.add_dependency(%q<linecache19>, [">= 0.5.11"])
      s.add_dependency(%q<ruby-debug-base19>, [">= 0.11.19"])
    end
  else
    s.add_dependency(%q<columnize>, [">= 0.3.1"])
    s.add_dependency(%q<linecache19>, [">= 0.5.11"])
    s.add_dependency(%q<ruby-debug-base19>, [">= 0.11.19"])
  end
end
@cldwalker
Owner

I handled adding cli to $LOAD_PATH in debugger.rb. Looks like I need the same in ruby-debug.rb. I'll take a look friday.

@jimmycuadra

This issue affects Spork's debugger integration as well - see https://github.com/sporkrb/spork/blob/master/lib/spork/ext/ruby-debug.rb.

@cldwalker cldwalker closed this in df78a71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.