interrupt during require_gem

Discussion in 'Ruby' started by Joel VanderWerf, Jun 2, 2008.

  1. Bad timing I guess: I happened to interrupt a program presumably during
    require_gem or whatever method happens when you have RUBYOPT=rubygems.
    This caused a huge dump of warnings about invalid gem specs (not even
    gems I was using in my code). Could this be handled in a way that
    doesn't dump all these messages (shown below)? I'm not including the
    backtrace, because it didn't show where these warnings were generated.

    WARNING: Interrupt
    Gem::Specification.new do |s|
    s.name = %q{columnize}
    s.version = "0.1"

    s.specification_version = 1 if s.respond_to? :specification_version=

    s.required_rubygems_version = nil if s.respond_to?
    :required_rubygems_version=
    s.authors = ["R. Bernstein"]
    s.cert_chain = nil
    s.date = %q{2007-12-08}
    s.description = %q{Columnize is a module for reading and caching
    lines. This may be useful for example in a debugger where the same lines
    are shown many times.}
    s.email = %q{}
    s.extra_rdoc_files = ["README", "lib/columnize.rb"]
    s.files = ["AUTHORS", "COPYING", "ChangeLog", "NEWS", "README",
    "Rakefile", "VERSION", "lib/columnize.rb", "test/test-columnize.rb"]
    s.has_rdoc = true
    s.homepage = %q{http://rubyforge.org/projects/rocky-hacks/columnize}
    s.require_paths = ["lib"]
    s.required_ruby_version = Gem::Requirement.new(">= 1.8.2")
    s.rubyforge_project = %q{rocky-hacks}
    s.rubygems_version = %q{1.1.0}
    s.summary = %q{Read file with caching}
    end
    WARNING: Invalid .gemspec format in
    '/usr/local/lib/ruby/gems/1.8/specifications/columnize-0.1.gemspec'
    WARNING: Interrupt
    Gem::Specification.new do |s|
    s.name = %q{mongrel}
    s.version = "1.1.4"

    s.specification_version = 2 if s.respond_to? :specification_version=

    ...
    ...

    (and much more like this)

    --
    vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
     
    Joel VanderWerf, Jun 2, 2008
    #1
    1. Advertising

  2. Joel VanderWerf

    Roger Pack Guest

    > WARNING: Interrupt
    > Gem::Specification.new do |s|


    I get those all the time, too, if I interrupt a rails app right after
    startup. Usually they're considered benign, but, as you mentioned,
    confusing :)
    -R
    --
    Posted via http://www.ruby-forum.com/.
     
    Roger Pack, Jun 3, 2008
    #2
    1. Advertising

  3. Joel VanderWerf

    Eric Hodel Guest

    On Jun 2, 2008, at 13:42 PM, Joel VanderWerf wrote:
    > Bad timing I guess: I happened to interrupt a program presumably
    > during require_gem or whatever method happens when you have
    > RUBYOPT=rubygems. This caused a huge dump of warnings about invalid
    > gem specs (not even gems I was using in my code). Could this be
    > handled in a way that doesn't dump all these messages (shown below)?
    > I'm not including the backtrace, because it didn't show where these
    > warnings were generated.
    >
    > WARNING: Interrupt
    > Gem::Specification.new do |s|
    > s.name = %q{columnize}
    > s.version = "0.1"
    >
    > s.specification_version = 1 if s.respond_to? :specification_version=
    >
    > s.required_rubygems_version = nil if
    > s.respond_to? :required_rubygems_version=
    > s.authors = ["R. Bernstein"]
    > s.cert_chain = nil
    > s.date = %q{2007-12-08}
    > s.description = %q{Columnize is a module for reading and caching
    > lines. This may be useful for example in a debugger where the same
    > lines are shown many times.}
    > s.email = %q{}
    > s.extra_rdoc_files = ["README", "lib/columnize.rb"]
    > s.files = ["AUTHORS", "COPYING", "ChangeLog", "NEWS", "README",
    > "Rakefile", "VERSION", "lib/columnize.rb", "test/test-columnize.rb"]
    > s.has_rdoc = true
    > s.homepage = %q{http://rubyforge.org/projects/rocky-hacks/columnize}
    > s.require_paths = ["lib"]
    > s.required_ruby_version = Gem::Requirement.new(">= 1.8.2")
    > s.rubyforge_project = %q{rocky-hacks}
    > s.rubygems_version = %q{1.1.0}
    > s.summary = %q{Read file with caching}
    > end
    > WARNING: Invalid .gemspec format in '/usr/local/lib/ruby/gems/1.8/
    > specifications/columnize-0.1.gemspec'
    > WARNING: Interrupt
    > Gem::Specification.new do |s|
    > s.name = %q{mongrel}
    > s.version = "1.1.4"
    >
    > s.specification_version = 2 if s.respond_to? :specification_version=
    >
    > ...
    > ...
    >
    > (and much more like this)


    Can you file a bug? I know where to fix this, but am on a larger
    change at the moment and don't want to confuse myself.
     
    Eric Hodel, Jun 5, 2008
    #3
  4. Eric Hodel wrote:
    > Can you file a bug? I know where to fix this, but am on a larger change
    > at the moment and don't want to confuse myself.


    Hi, Eric,
    Bug filed. Thanks!

    --
    vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
     
    Joel VanderWerf, Jun 5, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gavin Sinclair

    require vs require_gem

    Gavin Sinclair, Jun 17, 2004, in forum: Ruby
    Replies:
    2
    Views:
    132
    Chad Fowler
    Jun 18, 2004
  2. Eirikur Hallgrimsson
    Replies:
    3
    Views:
    163
    Gavin Sinclair
    Oct 10, 2004
  3. Lars Olsson
    Replies:
    2
    Views:
    108
    Jim Weirich
    Dec 2, 2005
  4. Wes Gamble
    Replies:
    3
    Views:
    129
    Jim Weirich
    Mar 23, 2006
  5. Andrew Gibson

    require_gem question

    Andrew Gibson, Jul 26, 2006, in forum: Ruby
    Replies:
    1
    Views:
    98
    Eric Hodel
    Jul 29, 2006
Loading...

Share This Page