[Rubygems-developers] [ rubygems-Bugs-26792 ] uses gem even when an install fails

noreply at rubyforge.org noreply at rubyforge.org
Wed Jul 29 19:59:57 EDT 2009


Bugs item #26792, was opened at 2009-07-29 23:59
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=26792&group_id=126

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Roger Pack (rogerdpack)
Assigned to: Nobody (None)
Summary: uses gem even when an install fails

Initial Comment:
Appears that in 1.9, at least

if you install a gem, and the installation fails

then you run 
require 'gemname'
it still loads it--in its very broken state.

At least that's about what I figure from scratching my head at this circumstance:

C:\dev\ruby\downloads\ruby-debug\pkg>gem search linecache -b

*** LOCAL GEMS ***

mark-moseley-linecache (0.5.2)
# note the lack of linecache -- removing mark-moseley-linecache seems to not affect the results, either

*** REMOTE GEMS ***

linecache (0.43)
mark-moseley-linecache (0.5.2)

C:\dev\ruby\downloads\ruby-debug\pkg>gem install linecache
Building native extensions.  This could take a while...
ERROR:  Error installing linecache:
        ERROR: Failed to build gem native extension.

c:/installs/ruby_trunk_installed/bin/ruby.exe extconf.rb
Can't handle 1.9.x yet
*** extconf.rb failed ***
...

C:\dev\ruby\downloads\ruby-debug\pkg>gem search linecache

*** LOCAL GEMS ***

mark-moseley-linecache (0.5.2)

C:\dev\ruby\downloads\ruby-debug\pkg>irb
irb(main):001:0> require 'ruby-debug'
LoadError: no such file to load -- c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/linecache-0.43/lib/../lib/trace_nums # note that it's using the linecache-0.43 that just failed
        from c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/linecache-0.43/lib/tracelines.rb:12:in `require'
        from c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/linecache-0.43/lib/tracelines.rb:12:in `rescue in <module:TraceLineNumbers>'
        from c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/linecache-0.43/lib/tracelines.rb:8:in `<module:TraceLineNumbers>'
        from c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/linecache-0.43/lib/tracelines.rb:6:in `<top (required)>'
        from c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/linecache-0.43/lib/linecache.rb:63:in `require'
        from c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/linecache-0.43/lib/linecache.rb:63:in `<top (required)>'
        from c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/mark-moseley-ruby-debug-base-0.11.6/lib/ruby-debug-base.rb:3:in `require'
        from c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/mark-moseley-ruby-debug-base-0.11.6/lib/ruby-debug-base.rb:3:in `<top (required)>'
        from c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/ruby-debug-0.11/cli/ruby-debug.rb:5:in `require'
        from c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/ruby-debug-0.11/cli/ruby-debug.rb:5:in `<top (required)>'
        from (irb):1:in `require'
        from (irb):1
        from c:/installs/ruby_trunk_installed/bin/irb.bat:20:in `<main>'

Thanks!

[gem v 1.3.5, ruby 1.9.2 trunk]

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=26792&group_id=126


More information about the Rubygems-developers mailing list