[Rubygems-developers] extconf.rb fix

Daniel Berger djberg96 at gmail.com
Wed Jul 18 14:32:18 EDT 2007


Upon further review it looks like it's already in the 'ext' directory,
causing the Dir.chdir method to fail. Removing the Dir.chdir block
fixed the problem.

I'm not sure what the desired behavior is, but there you go.

Regards,

Dan

On 7/18/07, Daniel Berger <djberg96 at gmail.com> wrote:
> This breaks my gems (I tried it with sys-host 0.6.0). The gem_make.out
> file is empty, so I'm not sure what happened.
>
> Investigating further...
>
> Regards,
>
> Dan
>
> On 7/18/07, Ryan Davis <ryand-ruby at zenspider.com> wrote:
> > Review Please...
> >
> > On Jul 10, 2007, at 20:15 , Ryan Davis wrote:
> >
> > > I think we've got a bug for extension when there is a subdir in the
> > > path (eg "ext/extconf.rb"). I'm pretty sure the following patch fixes
> > > this situation, but Aaron has grown too cranky to apply and test it.
> > >
> > > Index: installer.rb
> > > ===================================================================
> > > --- installer.rb      (revision 1259)
> > > +++ installer.rb      (working copy)
> > > @@ -642,12 +642,15 @@
> > >     class ExtExtConfBuilder < ExtBuilder
> > >       def self.build(extension, directory, dest_path, results)
> > > -      cmd = "#{Gem.ruby} #{File.basename extension}"
> > > -      cmd << " #{ARGV.join " "}" unless ARGV.empty?
> > > +      dir, ext = File.split extension
> > > +      Dir.chdir dir do
> > > +        cmd = "#{Gem.ruby} #{ext}"
> > > +        cmd << " #{ARGV.join " "}" unless ARGV.empty?
> > > -      run cmd, results
> > > +        run cmd, results
> > > -      make dest_path, results
> > > +        make dest_path, results
> > > +      end
> > >         results
> > >       end
> > >
> > > _______________________________________________
> > > Rubygems-developers mailing list
> > > Rubygems-developers at rubyforge.org
> > > http://rubyforge.org/mailman/listinfo/rubygems-developers
> >
> > _______________________________________________
> > Rubygems-developers mailing list
> > Rubygems-developers at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rubygems-developers
> >
>


More information about the Rubygems-developers mailing list