From ryand-ruby at zenspider.com Tue Jul 10 23:15:17 2007 From: ryand-ruby at zenspider.com (Ryan Davis) Date: Tue, 10 Jul 2007 20:15:17 -0700 Subject: [Rubygems-developers] extconf.rb fix Message-ID: 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 From anatol.pomozov at gmail.com Wed Jul 11 09:50:39 2007 From: anatol.pomozov at gmail.com (Anatol Pomozov) Date: Wed, 11 Jul 2007 17:50:39 +0400 Subject: [Rubygems-developers] Swap library directory of some gem to development source tree Message-ID: <3665a1a00707110650u51caa967r49e51c97a941c438@mail.gmail.com> Hi devs. I am working on some project, lets say buildr and I want to to use latest unreleased version. What I am doing now cd buildr-from-svn rake gem gem install pkg/buildr-1.2.1.gem So unreleased version of buildr gem installs on my machine. It is what I need . But I constantly develop this project and after change in buildr sources I want to check how it works. To it I need to install build and install gem again. It is 3 quite long steps. I would like to avoid it. What I want is that gem pickup sources of some gem from directory not from gem library directory. Is it possible?? Running through rubygems sources I've found GEM_SKIP mention. And tried to use it like set GEM_SKIP=buildr ruby -I path/to/svn/dir c:/progra~1/ruby/bin/buildr I've thought that rubygems would drop buildr libs directory from load path and adds mine, but it doesn't. Instead I've got Gem::LoadError. What is the correct way of doing such thing?? If I use linux on my machine I would have quick-and-dirty solution - link from /path/to/svn/dir to /usr/lib/ruby/gems/1.8/gems/buildr-xxx But what to do on Windows? -- anatol -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20070711/d193c98e/attachment.html From jim.weirich at gmail.com Wed Jul 11 09:57:59 2007 From: jim.weirich at gmail.com (Jim Weirich) Date: Wed, 11 Jul 2007 09:57:59 -0400 Subject: [Rubygems-developers] Swap library directory of some gem to development source tree In-Reply-To: <3665a1a00707110650u51caa967r49e51c97a941c438@mail.gmail.com> References: <3665a1a00707110650u51caa967r49e51c97a941c438@mail.gmail.com> Message-ID: <4A848E7C-29AB-49FE-A6AB-2A5475479B17@weirichhouse.org> On Jul 11, 2007, at 9:50 AM, Anatol Pomozov wrote: [...] > But I constantly develop this project and after change in buildr > sources I want to check how it works. To it I need to install build > and install gem again. It is 3 quite long steps. I would like to > avoid it. > > What I want is that gem pickup sources of some gem from directory > not from gem library directory. Is it possible?? [... GEM_SKIP elided ...] > > What is the correct way of doing such thing?? All you need to do is arrange that the development directories appear on the Ruby Load path. Then rubygems will never kick in and activate the gem installed versions. Generally, I do this from the project root: ruby -Ilib test/test_something.rb (Actually, Rake does it, but you get the idea). -- -- Jim Weirich -- jim at weirichhouse.org From anatol.pomozov at gmail.com Wed Jul 11 10:06:14 2007 From: anatol.pomozov at gmail.com (Anatol Pomozov) Date: Wed, 11 Jul 2007 18:06:14 +0400 Subject: [Rubygems-developers] Swap library directory of some gem to development source tree In-Reply-To: <4A848E7C-29AB-49FE-A6AB-2A5475479B17@weirichhouse.org> References: <3665a1a00707110650u51caa967r49e51c97a941c438@mail.gmail.com> <4A848E7C-29AB-49FE-A6AB-2A5475479B17@weirichhouse.org> Message-ID: <3665a1a00707110706v9675188x1396e94d672962b7@mail.gmail.com> After adding to buildr.cmd -I parameter like this @ruby -I C:/work/opensource/ruby/buildr/lib "c:/PROGRA~1/ruby/bin/buildr" %* I have an exception c:/PROGRA~1/ruby/bin/buildr:16:in `load': no such file to load -- buildr (LoadError) from c:/PROGRA~1/ruby/bin/buildr:16 bin/buildr is a standard #!c:/PROGRA~1/ruby/bin/ruby # # This file was generated by RubyGems. # # The application 'buildr' is installed as part of a gem, and # this file is here to facilitate running it. # require 'rubygems' version = "> 0" if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then version = $1 ARGV.shift end gem 'buildr', version load 'buildr' # <========== EXCEPTION GOES FROM HERE What does it mean?? I have exception both with space and without in -I parameter -I path -Ipath PS >ruby --version ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32] >gem --version 0.9.4 On 7/11/07, Jim Weirich wrote: > > > On Jul 11, 2007, at 9:50 AM, Anatol Pomozov wrote: > > [...] > > But I constantly develop this project and after change in buildr > > sources I want to check how it works. To it I need to install build > > and install gem again. It is 3 quite long steps. I would like to > > avoid it. > > > > What I want is that gem pickup sources of some gem from directory > > not from gem library directory. Is it possible?? > [... GEM_SKIP elided ...] > > > > What is the correct way of doing such thing?? > > All you need to do is arrange that the development directories appear > on the Ruby Load path. Then rubygems will never kick in and activate > the gem installed versions. Generally, I do this from the project root: > > ruby -Ilib test/test_something.rb > > (Actually, Rake does it, but you get the idea). -- anatol -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20070711/3349dc80/attachment-0001.html From jim.weirich at gmail.com Wed Jul 11 10:48:40 2007 From: jim.weirich at gmail.com (Jim Weirich) Date: Wed, 11 Jul 2007 10:48:40 -0400 Subject: [Rubygems-developers] Swap library directory of some gem to development source tree In-Reply-To: <3665a1a00707110706v9675188x1396e94d672962b7@mail.gmail.com> References: <3665a1a00707110650u51caa967r49e51c97a941c438@mail.gmail.com> <4A848E7C-29AB-49FE-A6AB-2A5475479B17@weirichhouse.org> <3665a1a00707110706v9675188x1396e94d672962b7@mail.gmail.com> Message-ID: <4A6EC5B6-93B0-4F97-8662-990B22DCBF37@gmail.com> On Jul 11, 2007, at 10:06 AM, Anatol Pomozov wrote: > After adding to buildr.cmd -I parameter > > like this > @ruby -I C:/work/opensource/ruby/buildr/lib "c:/PROGRA~1/ruby/bin/ > buildr" %* > > I have an exception > > c:/PROGRA~1/ruby/bin/buildr:16:in `load': no such file to load -- > buildr (LoadError) > from c:/PROGRA~1/ruby/bin/buildr:16 > > bin/buildr is a standard > > #!c:/PROGRA~1/ruby/bin/ruby > # > # This file was generated by RubyGems. > # > # The application 'buildr' is installed as part of a gem, and > # this file is here to facilitate running it. > # > > require 'rubygems' > version = "> 0" > if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then > version = $1 > ARGV.shift > end > gem 'buildr', version > load 'buildr' # <========== EXCEPTION GOES FROM HERE > > > What does it mean?? It means that it is not finding 'buildr' anywhere in the load path. From your earlier post, I got the impression that you did not want to run the gem installed version of buildr. If this is the case, then don't try to execute the gem-created stub file (which explicitly loads the gem installed version of buildr into the load path). Instead, execute your main buildr application script directly. Guessing from your example, that would be something like: @ruby -I C:/work/opensource/ruby/buildr/lib "C:/work/opensource/ ruby/buildr/bin/buildr" %* Does that help? -- -- Jim Weirich -- jim.weirich at gmail.com From anatol.pomozov at gmail.com Wed Jul 11 10:59:42 2007 From: anatol.pomozov at gmail.com (Anatol Pomozov) Date: Wed, 11 Jul 2007 18:59:42 +0400 Subject: [Rubygems-developers] Swap library directory of some gem to development source tree In-Reply-To: <4A6EC5B6-93B0-4F97-8662-990B22DCBF37@gmail.com> References: <3665a1a00707110650u51caa967r49e51c97a941c438@mail.gmail.com> <4A848E7C-29AB-49FE-A6AB-2A5475479B17@weirichhouse.org> <3665a1a00707110706v9675188x1396e94d672962b7@mail.gmail.com> <4A6EC5B6-93B0-4F97-8662-990B22DCBF37@gmail.com> Message-ID: <3665a1a00707110759r7baa2d08j934e0e88ab3e2908@mail.gmail.com> Thank you Jim. @ruby -I C:/work/opensource/ruby/buildr/lib "C:/work/opensource/ruby/buildr/bin/buildr" %* Is what I need. On 7/11/07, Jim Weirich wrote: > > > On Jul 11, 2007, at 10:06 AM, Anatol Pomozov wrote: > > > After adding to buildr.cmd -I parameter > > > > like this > > @ruby -I C:/work/opensource/ruby/buildr/lib "c:/PROGRA~1/ruby/bin/ > > buildr" %* > > > > I have an exception > > > > c:/PROGRA~1/ruby/bin/buildr:16:in `load': no such file to load -- > > buildr (LoadError) > > from c:/PROGRA~1/ruby/bin/buildr:16 > > > > bin/buildr is a standard > > > > #!c:/PROGRA~1/ruby/bin/ruby > > # > > # This file was generated by RubyGems. > > # > > # The application 'buildr' is installed as part of a gem, and > > # this file is here to facilitate running it. > > # > > > > require 'rubygems' > > version = "> 0" > > if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then > > version = $1 > > ARGV.shift > > end > > gem 'buildr', version > > load 'buildr' # <========== EXCEPTION GOES FROM HERE > > > > > > What does it mean?? > > It means that it is not finding 'buildr' anywhere in the load path. > > From your earlier post, I got the impression that you did not want > to run the gem installed version of buildr. If this is the case, > then don't try to execute the gem-created stub file (which explicitly > loads the gem installed version of buildr into the load path). > Instead, execute your main buildr application script directly. > > Guessing from your example, that would be something like: > > @ruby -I C:/work/opensource/ruby/buildr/lib "C:/work/opensource/ > ruby/buildr/bin/buildr" %* > > Does that help? > > -- > -- Jim Weirich > -- jim.weirich at gmail.com > > > > > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > -- anatol -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20070711/279a8b31/attachment.html From curt.hibbs at gmail.com Thu Jul 12 11:21:23 2007 From: curt.hibbs at gmail.com (Curt Hibbs) Date: Thu, 12 Jul 2007 10:21:23 -0500 Subject: [Rubygems-developers] Installing Gems on Windows In-Reply-To: <95a868100707120521h404c8a15nf1e7fc36150c2765@mail.gmail.com> References: <95a868100707120521h404c8a15nf1e7fc36150c2765@mail.gmail.com> Message-ID: <31d15f490707120821r3f1f500eo8565b54160d77f8c@mail.gmail.com> On 7/12/07, Brian Hogan wrote: > > Curt: > > I was wondering if you'd be interested in including a small .bat I wrote > in the One Click Ruby Installer. It makes gem installation easier for > newbies on Windows. Take a look at my blog posting at > http://www.napcsweb.com/blog/2007/07/12/making-it-easier-to-install-gems-on-windows/and let me know what you think. It wouldn't replace the regular method, but > it can be a time saver. > I like it! In fact, I wonder if (at least on Windows) there is a decent way to really make this the default and actually replace the normal gem install method (with an override option of course). This would follow the Rails philosophy of using intelligent defaults with overrides when needed. I cc'd the RubyGems developers on this to get their thoughts. Curt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20070712/ed06a935/attachment.html From gregory.t.brown at gmail.com Fri Jul 13 11:53:15 2007 From: gregory.t.brown at gmail.com (Gregory Brown) Date: Fri, 13 Jul 2007 11:53:15 -0400 Subject: [Rubygems-developers] Installing Gems on Windows In-Reply-To: <31d15f490707120821r3f1f500eo8565b54160d77f8c@mail.gmail.com> References: <95a868100707120521h404c8a15nf1e7fc36150c2765@mail.gmail.com> <31d15f490707120821r3f1f500eo8565b54160d77f8c@mail.gmail.com> Message-ID: On 7/12/07, Curt Hibbs wrote: > On 7/12/07, Brian Hogan wrote: > > Curt: > > > > I was wondering if you'd be interested in including a small .bat I wrote > in the One Click Ruby Installer. It makes gem installation easier for > newbies on Windows. Take a look at my blog posting at > http://www.napcsweb.com/blog/2007/07/12/making-it-easier-to-install-gems-on-windows/ > and let me know what you think. It wouldn't replace the regular method, but > it can be a time saver. > > > > > I like it! > > In fact, I wonder if (at least on Windows) there is a decent way to really > make this the default and actually replace the normal gem install method > (with an override option of course). This would follow the Rails philosophy > of using intelligent defaults with overrides when needed. > > I cc'd the RubyGems developers on this to get their thoughts. Oh, I don't know. I like the idea of having the script around, but changing the way the gem command works just within the one click installer feels a little itchy to me. Until we have a real solution in RubyGems, I'd rather *know* I'm using a third party helper than find it surprising if I ever need to install gems anywhere but windows. But the script is a great idea, if only to help keep non-programmer clients of mine from getting themselves into trouble when installing dependencies on Windows. :) From transfire at gmail.com Fri Jul 13 14:13:17 2007 From: transfire at gmail.com (TRANS) Date: Fri, 13 Jul 2007 14:13:17 -0400 Subject: [Rubygems-developers] dependency version constraints Message-ID: <4b6f054f0707131113r459aa2a6q248f9a30892dafd6@mail.gmail.com> I have a question about versioning and the gem command... If use #gem to constrain the version, does the gems dependencies likewise become constrained? Eg. If I have gem 'foo-1.0' that depends on a gem 'bar 2.0+', does gem 'foo', '>= 1.0' automatically cause: gem 'foo', '>= 2.0' Thanks, T. From ryand-ruby at zenspider.com Fri Jul 13 18:04:46 2007 From: ryand-ruby at zenspider.com (Ryan Davis) Date: Fri, 13 Jul 2007 15:04:46 -0700 Subject: [Rubygems-developers] dependency version constraints In-Reply-To: <4b6f054f0707131113r459aa2a6q248f9a30892dafd6@mail.gmail.com> References: <4b6f054f0707131113r459aa2a6q248f9a30892dafd6@mail.gmail.com> Message-ID: <2B52EE09-625D-45CE-801F-84002E46CA34@zenspider.com> On Jul 13, 2007, at 11:13 , TRANS wrote: > I have a question about versioning and the gem command... > > If use #gem to constrain the version, does the gems dependencies > likewise become constrained? Eg. If I have gem 'foo-1.0' that depends > on a gem 'bar 2.0+', does > > gem 'foo', '>= 1.0' > > automatically cause: > > gem 'foo', '>= 2.0' Huh? Why would a dependency from foo-1.0 to bar-2.0+ change a gem call on foo for 1+ to 2+? From transfire at gmail.com Fri Jul 13 18:08:30 2007 From: transfire at gmail.com (TRANS) Date: Fri, 13 Jul 2007 18:08:30 -0400 Subject: [Rubygems-developers] dependency version constraints In-Reply-To: <2B52EE09-625D-45CE-801F-84002E46CA34@zenspider.com> References: <4b6f054f0707131113r459aa2a6q248f9a30892dafd6@mail.gmail.com> <2B52EE09-625D-45CE-801F-84002E46CA34@zenspider.com> Message-ID: <4b6f054f0707131508i5b01d710ya56b557e1610f54@mail.gmail.com> On 7/13/07, Ryan Davis wrote: > > On Jul 13, 2007, at 11:13 , TRANS wrote: > > > I have a question about versioning and the gem command... > > > > If use #gem to constrain the version, does the gems dependencies > > likewise become constrained? Eg. If I have gem 'foo-1.0' that depends > > on a gem 'bar 2.0+', does > > > > gem 'foo', '>= 1.0' > > > > automatically cause: > > > > gem 'foo', '>= 2.0' > > Huh? > > Why would a dependency from foo-1.0 to bar-2.0+ change a gem call on > foo for 1+ to 2+? Oops. that's a type. The last line should read: gem 'bar', '>= 2.0' Sorry, T. From transfire at gmail.com Fri Jul 13 18:09:21 2007 From: transfire at gmail.com (TRANS) Date: Fri, 13 Jul 2007 18:09:21 -0400 Subject: [Rubygems-developers] dependency version constraints In-Reply-To: <4b6f054f0707131508i5b01d710ya56b557e1610f54@mail.gmail.com> References: <4b6f054f0707131113r459aa2a6q248f9a30892dafd6@mail.gmail.com> <2B52EE09-625D-45CE-801F-84002E46CA34@zenspider.com> <4b6f054f0707131508i5b01d710ya56b557e1610f54@mail.gmail.com> Message-ID: <4b6f054f0707131509j46dad869lb54014ed7fd9e2e9@mail.gmail.com> On 7/13/07, TRANS wrote: > Oops. that's a type. The last line should read: Ugh... s/type/typo/ T. From thewoolleyman at gmail.com Fri Jul 13 19:14:10 2007 From: thewoolleyman at gmail.com (Chad Woolley) Date: Fri, 13 Jul 2007 16:14:10 -0700 Subject: [Rubygems-developers] dependency version constraints In-Reply-To: <4b6f054f0707131508i5b01d710ya56b557e1610f54@mail.gmail.com> References: <4b6f054f0707131113r459aa2a6q248f9a30892dafd6@mail.gmail.com> <2B52EE09-625D-45CE-801F-84002E46CA34@zenspider.com> <4b6f054f0707131508i5b01d710ya56b557e1610f54@mail.gmail.com> Message-ID: On 7/13/07, TRANS wrote: > On 7/13/07, Ryan Davis wrote: > > > > On Jul 13, 2007, at 11:13 , TRANS wrote: > > > > > I have a question about versioning and the gem command... > > > > > > If use #gem to constrain the version, does the gems dependencies > > > likewise become constrained? Eg. If I have gem 'foo-1.0' that depends > > > on a gem 'bar 2.0+', does > > > > > > gem 'foo', '>= 1.0' > > > > > > automatically cause: > > > > > > gem 'foo', '>= 2.0' > > > > Huh? > > > > Why would a dependency from foo-1.0 to bar-2.0+ change a gem call on > > foo for 1+ to 2+? > > Oops. that's a type. The last line should read: > > gem 'bar', '>= 2.0' > I think the answer is yes. Whatever gem spec end up getting loaded, that spec is used to determine what it's dependency versions are. From ryand-ruby at zenspider.com Wed Jul 18 03:08:11 2007 From: ryand-ruby at zenspider.com (Ryan Davis) Date: Wed, 18 Jul 2007 00:08:11 -0700 Subject: [Rubygems-developers] extconf.rb fix In-Reply-To: References: Message-ID: <040394AF-74AA-4DDD-81B0-7435F51187EF@zenspider.com> 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 From djberg96 at gmail.com Wed Jul 18 13:06:55 2007 From: djberg96 at gmail.com (Daniel Berger) Date: Wed, 18 Jul 2007 11:06:55 -0600 Subject: [Rubygems-developers] extconf.rb fix In-Reply-To: <040394AF-74AA-4DDD-81B0-7435F51187EF@zenspider.com> References: <040394AF-74AA-4DDD-81B0-7435F51187EF@zenspider.com> Message-ID: <6037b70c0707181006r1d20a97aya183947c36514903@mail.gmail.com> 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 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 > From djberg96 at gmail.com Wed Jul 18 14:32:18 2007 From: djberg96 at gmail.com (Daniel Berger) Date: Wed, 18 Jul 2007 12:32:18 -0600 Subject: [Rubygems-developers] extconf.rb fix In-Reply-To: <6037b70c0707181006r1d20a97aya183947c36514903@mail.gmail.com> References: <040394AF-74AA-4DDD-81B0-7435F51187EF@zenspider.com> <6037b70c0707181006r1d20a97aya183947c36514903@mail.gmail.com> Message-ID: <6037b70c0707181132t79f86ed2l48feeb534ebd4a40@mail.gmail.com> 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 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 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 > > > From rick.denatale at gmail.com Fri Jul 20 09:32:16 2007 From: rick.denatale at gmail.com (Rick DeNatale) Date: Fri, 20 Jul 2007 09:32:16 -0400 Subject: [Rubygems-developers] Recovery needed from power outage during gem install???? Message-ID: Yesterday, questions of religion aside, I tried to install the god gem. It asked me if I wanted to install the daemons gem which is a dependency, and proceeded to do so. Shortly after that the power failed, maybe the name of that gem is sacreligious after all. Anyway, after power became stable I tried installing again and it looks like gem install is trying to install from a partially downloaded gem. There's no indication of going to fetch anything remotely, even if I say sudo gem install --ry god it immediately produces a report that it's building native extensions and fails. I've put the transcript at the end of this post. Any idea what's going on and how to fix this? I've already tried moving /usr/local/lib/ruby/gems/1.8/gems/god-0.2.0/ext/god/gem_make.out and retrying. Note that the /home/systemlinks/usr/... in the transcript is because I've got my /usr directory 'mounted' via a sym link. $ sudo gem install god Building native extensions. This could take a while... ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. ruby extconf.rb install god creating Makefile make gcc -I. -I/usr/local/lib/ruby/1.8/i686-linux -I/usr/local/lib/ruby/1.8/i686-linux -I. -fPIC -g -O2 -c kqueue_handler.c kqueue_handler.c:122:7: warning: no newline at end of file gcc -I. -I/usr/local/lib/ruby/1.8/i686-linux -I/usr/local/lib/ruby/1.8/i686-linux -I. -fPIC -g -O2 -c netlink_handler.c netlink_handler.c:7:29: error: linux/connector.h: No such file or directory netlink_handler.c:8:27: error: linux/cn_proc.h: No such file or directory netlink_handler.c: In function 'nlh_handle_events': netlink_handler.c:26: error: 'CONNECTOR_MAX_MSG_SIZE' undeclared (first use in this function) netlink_handler.c:26: error: (Each undeclared identifier is reported only once netlink_handler.c:26: error: for each function it appears in.) netlink_handler.c:55: error: dereferencing pointer to incomplete type netlink_handler.c:57: error: dereferencing pointer to incomplete type netlink_handler.c:58: error: 'PROC_EVENT_EXIT' undeclared (first use in this function) netlink_handler.c:59: error: dereferencing pointer to incomplete type netlink_handler.c:63: error: dereferencing pointer to incomplete type netlink_handler.c:67: error: 'PROC_EVENT_FORK' undeclared (first use in this function) netlink_handler.c:68: error: dereferencing pointer to incomplete type netlink_handler.c:72: error: dereferencing pointer to incomplete type netlink_handler.c: In function 'connect_to_netlink': netlink_handler.c:88: error: invalid application of 'sizeof' to incomplete type 'struct cn_msg' netlink_handler.c:93: error: 'NETLINK_CONNECTOR' undeclared (first use in this function) netlink_handler.c:97: error: 'CN_IDX_PROC' undeclared (first use in this function) netlink_handler.c:104: error: invalid application of 'sizeof' to incomplete type 'struct cn_msg' netlink_handler.c:112: error: dereferencing pointer to incomplete type netlink_handler.c:113: error: dereferencing pointer to incomplete type netlink_handler.c:113: error: 'CN_VAL_PROC' undeclared (first use in this function) netlink_handler.c:114: error: dereferencing pointer to incomplete type netlink_handler.c:115: error: dereferencing pointer to incomplete type netlink_handler.c:116: error: dereferencing pointer to incomplete type netlink_handler.c:117: error: dereferencing pointer to incomplete type netlink_handler.c:117: error: 'PROC_CN_MCAST_LISTEN' undeclared (first use in this function) netlink_handler.c:140:7: warning: no newline at end of file make: *** [netlink_handler.o] Error 1 Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/god-0.2.0 for inspection. Results logged to /home/systemlinks/usr/local/lib/ruby/gems/1.8/gems/god-0.2.0/ext/god/gem_make.out -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ From drnicwilliams at gmail.com Fri Jul 20 09:56:10 2007 From: drnicwilliams at gmail.com (Nic Williams) Date: Fri, 20 Jul 2007 15:56:10 +0200 Subject: [Rubygems-developers] Recovery needed from power outage during gem install???? In-Reply-To: References: Message-ID: <44b555bb0707200656o48190b2ev70452f607c12fc76@mail.gmail.com> You are right. It is wrong for "god to be dependent upon daemons. Just seems wrong somehow :) On 7/20/07, Rick DeNatale wrote: > > Yesterday, questions of religion aside, I tried to install the god gem. > It asked me if I wanted to install the daemons gem which is a > dependency, and proceeded to do so. Shortly after that the power > failed, maybe the name of that gem is sacreligious after all. > > Anyway, after power became stable I tried installing again and it > looks like gem install is trying to install from a partially > downloaded gem. There's no indication of going to fetch anything > remotely, even if I say sudo gem install --ry god it immediately > produces a report that it's building native extensions and fails. > I've put the transcript at the end of this post. > > Any idea what's going on and how to fix this? I've already tried > moving /usr/local/lib/ruby/gems/1.8/gems/god-0.2.0/ext/god/gem_make.out > and retrying. > > Note that the /home/systemlinks/usr/... in the transcript is because > I've got my /usr directory 'mounted' via a sym link. > > $ sudo gem install god > Building native extensions. This could take a while... > ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) > ERROR: Failed to build gem native extension. > > ruby extconf.rb install god > creating Makefile > > make > gcc -I. -I/usr/local/lib/ruby/1.8/i686-linux > -I/usr/local/lib/ruby/1.8/i686-linux -I. -fPIC -g -O2 -c > kqueue_handler.c > kqueue_handler.c:122:7: warning: no newline at end of file > gcc -I. -I/usr/local/lib/ruby/1.8/i686-linux > -I/usr/local/lib/ruby/1.8/i686-linux -I. -fPIC -g -O2 -c > netlink_handler.c > netlink_handler.c:7:29: error: linux/connector.h: No such file or > directory > netlink_handler.c:8:27: error: linux/cn_proc.h: No such file or directory > netlink_handler.c: In function 'nlh_handle_events': > netlink_handler.c:26: error: 'CONNECTOR_MAX_MSG_SIZE' undeclared > (first use in this function) > netlink_handler.c:26: error: (Each undeclared identifier is reported only > once > netlink_handler.c:26: error: for each function it appears in.) > netlink_handler.c:55: error: dereferencing pointer to incomplete type > netlink_handler.c:57: error: dereferencing pointer to incomplete type > netlink_handler.c:58: error: 'PROC_EVENT_EXIT' undeclared (first use > in this function) > netlink_handler.c:59: error: dereferencing pointer to incomplete type > netlink_handler.c:63: error: dereferencing pointer to incomplete type > netlink_handler.c:67: error: 'PROC_EVENT_FORK' undeclared (first use > in this function) > netlink_handler.c:68: error: dereferencing pointer to incomplete type > netlink_handler.c:72: error: dereferencing pointer to incomplete type > netlink_handler.c: In function 'connect_to_netlink': > netlink_handler.c:88: error: invalid application of 'sizeof' to > incomplete type 'struct cn_msg' > netlink_handler.c:93: error: 'NETLINK_CONNECTOR' undeclared (first use > in this function) > netlink_handler.c:97: error: 'CN_IDX_PROC' undeclared (first use in > this function) > netlink_handler.c:104: error: invalid application of 'sizeof' to > incomplete type 'struct cn_msg' > netlink_handler.c:112: error: dereferencing pointer to incomplete type > netlink_handler.c:113: error: dereferencing pointer to incomplete type > netlink_handler.c:113: error: 'CN_VAL_PROC' undeclared (first use in > this function) > netlink_handler.c:114: error: dereferencing pointer to incomplete type > netlink_handler.c:115: error: dereferencing pointer to incomplete type > netlink_handler.c:116: error: dereferencing pointer to incomplete type > netlink_handler.c:117: error: dereferencing pointer to incomplete type > netlink_handler.c:117: error: 'PROC_CN_MCAST_LISTEN' undeclared (first > use in this function) > netlink_handler.c:140:7: warning: no newline at end of file > make: *** [netlink_handler.o] Error 1 > > > Gem files will remain installed in > /usr/local/lib/ruby/gems/1.8/gems/god-0.2.0 for inspection. > Results logged to > /home/systemlinks/usr/local/lib/ruby/gems/1.8/gems/god-0.2.0 > /ext/god/gem_make.out > > -- > Rick DeNatale > > My blog on Ruby > http://talklikeaduck.denhaven2.com/ > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > -- Dr Nic Williams http://drnicacademy.com - Ruby/Rails training around the world http://drnicwilliams.com - Ruby/Rails/Javascript/Web2.0 skype: nicwilliams (p) +61 7 3102 3237 (Finds me anywhere in the world, via Skype) (m) +4673 681 5093 (Swedish mobile) (f) +61 7 3305 7572 (sends fax to my email) mail) Tele2 AB, c/o Berit Bergstrom Archimedesvagen 4, Bromma, 16866, Sweden -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20070720/f9a553c5/attachment.html From hgs at dmu.ac.uk Fri Jul 20 09:46:12 2007 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Fri, 20 Jul 2007 14:46:12 +0100 (WEST) Subject: [Rubygems-developers] Recovery needed from power outage during gem install???? In-Reply-To: References: Message-ID: On Fri, 20 Jul 2007, Rick DeNatale wrote: > Anyway, after power became stable I tried installing again and it > looks like gem install is trying to install from a partially > downloaded gem. There's no indication of going to fetch anything [...] > $ sudo gem install god > Building native extensions. This could take a while... > ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) > ERROR: Failed to build gem native extension. Yep, nothing remotely remote there, AFAICS... > > Gem files will remain installed in > /usr/local/lib/ruby/gems/1.8/gems/god-0.2.0 for inspection. I'd try removing that and anything claiming to be god in the cache directory. Then you should be able to have a clean start. [And put in a capital equipment bid for an uninterruptible power supply?] Might be a bit drastic, but it's probably quicker than other methods. Unless you only have a 2400 baud modem for internet access.... Or you could wait for someone who's more familiar with the internals than I am. Hugh From rick.denatale at gmail.com Fri Jul 20 10:41:26 2007 From: rick.denatale at gmail.com (Rick DeNatale) Date: Fri, 20 Jul 2007 10:41:26 -0400 Subject: [Rubygems-developers] Recovery needed from power outage during gem install???? In-Reply-To: References: Message-ID: On 7/20/07, Hugh Sasse wrote: > On Fri, 20 Jul 2007, Rick DeNatale wrote: > > > Anyway, after power became stable I tried installing again and it > > looks like gem install is trying to install from a partially > > downloaded gem. There's no indication of going to fetch anything > [...] > > $ sudo gem install god > > Building native extensions. This could take a while... > > ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) > > ERROR: Failed to build gem native extension. > > Yep, nothing remotely remote there, AFAICS... > > > > Gem files will remain installed in > > /usr/local/lib/ruby/gems/1.8/gems/god-0.2.0 for inspection. > > I'd try removing that and anything claiming to be god in the cache > directory. Then you should be able to have a clean start. [And put > in a capital equipment bid for an uninterruptible power supply?] > > Might be a bit drastic, but it's probably quicker than other methods. > Unless you only have a 2400 baud modem for internet access.... > > Or you could wait for someone who's more familiar with the internals > than I am. Upon further investigation, I don't think that this is a gem issue after all. Turns out that god plays favorites, it looks like it's only built and tested against redhat linux, and I'm on ubuntu. It's complaining about some missing .h files I've tried tracking them down and installing the debian packages which include them, but I'm still not getting very far. I'll move this over to ruby-talk since it seems to have more to do with this particular deity^h^h^h^h^hgem than the gem infrastructure. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ From kevin.clark at gmail.com Fri Jul 20 12:50:14 2007 From: kevin.clark at gmail.com (Kevin Clark) Date: Fri, 20 Jul 2007 09:50:14 -0700 Subject: [Rubygems-developers] Recovery needed from power outage during gem install???? In-Reply-To: References: Message-ID: We actually just got a patch in for ubuntu compatability. I'll see about getting tom to push a point release. On 7/20/07, Rick DeNatale wrote: > On 7/20/07, Hugh Sasse wrote: > > On Fri, 20 Jul 2007, Rick DeNatale wrote: > > > > > Anyway, after power became stable I tried installing again and it > > > looks like gem install is trying to install from a partially > > > downloaded gem. There's no indication of going to fetch anything > > [...] > > > $ sudo gem install god > > > Building native extensions. This could take a while... > > > ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) > > > ERROR: Failed to build gem native extension. > > > > Yep, nothing remotely remote there, AFAICS... > > > > > > Gem files will remain installed in > > > /usr/local/lib/ruby/gems/1.8/gems/god-0.2.0 for inspection. > > > > I'd try removing that and anything claiming to be god in the cache > > directory. Then you should be able to have a clean start. [And put > > in a capital equipment bid for an uninterruptible power supply?] > > > > Might be a bit drastic, but it's probably quicker than other methods. > > Unless you only have a 2400 baud modem for internet access.... > > > > Or you could wait for someone who's more familiar with the internals > > than I am. > > Upon further investigation, I don't think that this is a gem issue > after all. Turns out that god plays favorites, it looks like it's > only built and tested against redhat linux, and I'm on ubuntu. It's > complaining about some missing .h files I've tried tracking them down > and installing the debian packages which include them, but I'm still > not getting very far. > > I'll move this over to ruby-talk since it seems to have more to do > with this particular deity^h^h^h^h^hgem than the gem infrastructure. > > -- > Rick DeNatale > > My blog on Ruby > http://talklikeaduck.denhaven2.com/ > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > -- Kevin Clark http://glu.ttono.us From weyus at att.net Sun Jul 22 14:06:06 2007 From: weyus at att.net (Wes Gamble) Date: Sun, 22 Jul 2007 13:06:06 -0500 Subject: [Rubygems-developers] Unable to install any gems including system update due to absolute path errors on Windows Message-ID: <46A39C8E.8090701@att.net> All, My environment: Windows XP C:\eclipse\workspace>ruby -v ruby 1.8.4 (2005-12-24) [i386-mswin32] C:\eclipse\workspace>gem environment RubyGems Environment: - VERSION: 0.9.4 (0.9.4) - INSTALLATION DIRECTORY: c:/ruby/lib/ruby/gems/1.8 - GEM PATH: - c:/ruby/lib/ruby/gems/1.8 - REMOTE SOURCES: - http://gems.rubyforge.org If I attempt to install any Rubygem, including the system update, I get an error informing me that a clearly absolute path is not absolute. Here's an example: C:\eclipse\workspace>gem update capistrano Updating installed gems... Attempting remote update of capistrano Install required dependency highline? [Yn] Y ERROR: While executing gem ... (ArgumentError) install directory # not absolute This appears to be due to the following code in installer.rb: private def expand_and_validate(directory) directory = Pathname.new(directory).expand_path unless directory.absolute? raise ArgumentError, "install directory %p not absolute" % directory end directory.to_str end which depends on the Pathname library, which in turn assumes that any directory that doesn't start with "/" is relative. See below: C:\eclipse\workspace>irb irb(main):001:0> require 'pathname' => true irb(main):002:0> Pathname.new("C:/ruby/lib/ruby/gems/1.8/gems/highline-1.2.9").absolute? => false How do I fix my installation so that I can continue to use gems? Thanks, Wes From djberg96 at gmail.com Sun Jul 22 14:32:41 2007 From: djberg96 at gmail.com (Daniel Berger) Date: Sun, 22 Jul 2007 12:32:41 -0600 Subject: [Rubygems-developers] Unable to install any gems including system update due to absolute path errors on Windows In-Reply-To: <46A39C8E.8090701@att.net> References: <46A39C8E.8090701@att.net> Message-ID: <6037b70c0707221132p1cce41ddsabcd1ffae85fdd48@mail.gmail.com> On 7/22/07, Wes Gamble wrote: > All, > > My environment: > > Windows XP > > C:\eclipse\workspace>ruby -v > ruby 1.8.4 (2005-12-24) [i386-mswin32] > > C:\eclipse\workspace>gem environment > RubyGems Environment: > - VERSION: 0.9.4 (0.9.4) > - INSTALLATION DIRECTORY: c:/ruby/lib/ruby/gems/1.8 > - GEM PATH: > - c:/ruby/lib/ruby/gems/1.8 > - REMOTE SOURCES: > - http://gems.rubyforge.org > > If I attempt to install any Rubygem, including the system update, I get > an error informing me that a clearly absolute path is not absolute. > Here's an example: > > C:\eclipse\workspace>gem update capistrano > Updating installed gems... > Attempting remote update of capistrano > Install required dependency highline? [Yn] Y > ERROR: While executing gem ... (ArgumentError) > install directory > # > not absolute > > This appears to be due to the following code in installer.rb: > > private > def expand_and_validate(directory) > directory = Pathname.new(directory).expand_path > unless directory.absolute? > raise ArgumentError, "install directory %p not absolute" % directory > end > directory.to_str > end > > which depends on the Pathname library, which in turn assumes that any > directory that doesn't start with "/" is relative. See below: > > C:\eclipse\workspace>irb > irb(main):001:0> require 'pathname' > => true > irb(main):002:0> > Pathname.new("C:/ruby/lib/ruby/gems/1.8/gems/highline-1.2.9").absolute? > => false > > How do I fix my installation so that I can continue to use gems? Fix pathname.rb. Using Ruby 1.8.5: irb(main):005:0> Pathname.new("C:/ruby/lib/ruby/gems/1.8/gems/highline-1.2.9").absolute? => true Regards, Dan From thewoolleyman at gmail.com Tue Jul 24 00:24:24 2007 From: thewoolleyman at gmail.com (Chad Woolley) Date: Mon, 23 Jul 2007 21:24:24 -0700 Subject: [Rubygems-developers] Any experiences managing gems without root access? Message-ID: Hi, Does anyone have any scripts/guidelines/suggestions for using groups, set-groupID permissions, and/or umasks to avoid needing root access to install/update gems? Specifically, how to manage binaries installed in /usr/local/bin? Has anyone even tried this, or does everyone do it via manually via sudo (or automate via NOPASSWD entries in sudoers)? Thanks, --Chad W From drbrain at segment7.net Wed Jul 25 00:18:23 2007 From: drbrain at segment7.net (Eric Hodel) Date: Tue, 24 Jul 2007 21:18:23 -0700 Subject: [Rubygems-developers] Review Please Message-ID: http://rubyforge.org/tracker/index.php? func=detail&aid=8818&group_id=126&atid=578 I don't feel confident in making this change, so I would like some feedback. -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars From drbrain at segment7.net Wed Jul 25 02:19:44 2007 From: drbrain at segment7.net (Eric Hodel) Date: Tue, 24 Jul 2007 23:19:44 -0700 Subject: [Rubygems-developers] Platform selection in gem install In-Reply-To: <3945c4270706271828p372110eerfe37f15516baa9ba@mail.gmail.com> References: <3945c4270706250943n1a2598c3y55fe0acd9b82e870@mail.gmail.com> <3945c4270706271828p372110eerfe37f15516baa9ba@mail.gmail.com> Message-ID: On Jun 27, 2007, at 18:28, Alexey Verkhovsky wrote: > On 6/27/07, Eric Hodel wrote: >> Read the bugs and mailing list archive to see what's already been >> proposed. > > If you are talking about a discussion on this list that was back in > April, Chad Fowler showed me that. > > I think that a command-line option is a good first step towards a full > solution. If you agree, I will submit a patch. Have you been working on a patch? If not, I'm going to have a boatload of free time in August to work on this. I'll be making this work: >>> gem install mongrel --platform linux-i386 -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars From ryand-ruby at zenspider.com Wed Jul 25 04:07:57 2007 From: ryand-ruby at zenspider.com (Ryan Davis) Date: Wed, 25 Jul 2007 01:07:57 -0700 Subject: [Rubygems-developers] Platform selection in gem install In-Reply-To: References: <3945c4270706250943n1a2598c3y55fe0acd9b82e870@mail.gmail.com> <3945c4270706271828p372110eerfe37f15516baa9ba@mail.gmail.com> Message-ID: <0519B872-BF81-4368-A728-B28FF715F70B@zenspider.com> On Jul 24, 2007, at 23:19 , Eric Hodel wrote: > I'll be making this work: > >>>> gem install mongrel --platform linux-i386 ~/.gemrc plsktnx From wes.sheldahl at gmail.com Wed Jul 25 12:22:39 2007 From: wes.sheldahl at gmail.com (Wes Sheldahl) Date: Wed, 25 Jul 2007 12:22:39 -0400 Subject: [Rubygems-developers] Any experiences managing gems without root access? In-Reply-To: References: Message-ID: On 7/24/07, Chad Woolley wrote: > > Hi, > > Does anyone have any scripts/guidelines/suggestions for using groups, > set-groupID permissions, and/or umasks to avoid needing root access to > install/update gems? Specifically, how to manage binaries installed > in /usr/local/bin? > > Has anyone even tried this, or does everyone do it via manually via > sudo (or automate via NOPASSWD entries in sudoers)? > > Thanks, > --Chad W > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > I've always just used sudo for installing gems. Does this mean you found a way to have a gem install its binary in /usr/local/bin? I've never been able to control any of the install locations. If the gem is going to be used system-wide, it makes sense to restrict that to root. For user-specific gems, it might be nice to be able to install to ~/lib/gems, ~/bin etc. -- Wes Sheldahl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20070725/e8d037f8/attachment.html From drbrain at segment7.net Wed Jul 25 14:04:23 2007 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 25 Jul 2007 11:04:23 -0700 Subject: [Rubygems-developers] Platform selection in gem install In-Reply-To: <0519B872-BF81-4368-A728-B28FF715F70B@zenspider.com> References: <3945c4270706250943n1a2598c3y55fe0acd9b82e870@mail.gmail.com> <3945c4270706271828p372110eerfe37f15516baa9ba@mail.gmail.com> <0519B872-BF81-4368-A728-B28FF715F70B@zenspider.com> Message-ID: <41DCEC13-7A13-4720-B1BA-74261E149CB9@segment7.net> On Jul 25, 2007, at 01:07, Ryan Davis wrote: > On Jul 24, 2007, at 23:19 , Eric Hodel wrote: > >> I'll be making this work: >> >>>>> gem install mongrel --platform linux-i386 > > ~/.gemrc plsktnx It'll be even more automatic than that. -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars From drbrain at segment7.net Wed Jul 25 14:09:24 2007 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 25 Jul 2007 11:09:24 -0700 Subject: [Rubygems-developers] Any experiences managing gems without root access? In-Reply-To: References: Message-ID: <356913E0-1EFC-4A35-ABF2-893FBD4C234A@segment7.net> On Jul 25, 2007, at 09:22, Wes Sheldahl wrote: > On 7/24/07, Chad Woolley wrote: >> Does anyone have any scripts/guidelines/suggestions for using groups, >> set-groupID permissions, and/or umasks to avoid needing root >> access to >> install/update gems? Specifically, how to manage binaries installed >> in /usr/local/bin? >> >> Has anyone even tried this, or does everyone do it via manually via >> sudo (or automate via NOPASSWD entries in sudoers)? > > I've always just used sudo for installing gems. Does this mean you > found a way to have a gem install its binary in /usr/local/bin? > I've never been able to control any of the install locations. > > If the gem is going to be used system-wide, it makes sense to > restrict that to root. For user-specific gems, it might be nice to > be able to install to ~/lib/gems, ~/bin etc. You can create an alternate RubyGems repository and install gems into there using the GEM_HOME environment variable. -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars From weyus at att.net Wed Jul 25 14:10:39 2007 From: weyus at att.net (Wes Gamble) Date: Wed, 25 Jul 2007 13:10:39 -0500 Subject: [Rubygems-developers] Upgrading to new version of Ruby - what to do with gems? Message-ID: <46A7921F.1050806@att.net> I am currently on Ruby 1.8.4 on Windows XP. I'd like to move to 1.8.6 - do I need to reinstall all of my gems or is there a way for me to move them to my new 1.8.6 installation? Can I just copy them to the new gems location? Thanks, Wes From alexey.verkhovsky at gmail.com Wed Jul 25 15:41:38 2007 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Wed, 25 Jul 2007 13:41:38 -0600 Subject: [Rubygems-developers] Platform selection in gem install In-Reply-To: References: <3945c4270706250943n1a2598c3y55fe0acd9b82e870@mail.gmail.com> <3945c4270706271828p372110eerfe37f15516baa9ba@mail.gmail.com> Message-ID: <3945c4270707251241w11bc116evf47fe3f75b38973d@mail.gmail.com> On 7/25/07, Eric Hodel wrote: > > I think that a command-line option is a good first step towards a full > > solution. If you agree, I will submit a patch. > Have you been working on a patch? Not yet. For RubyWorks production stack project, we settled on packaging gems as native packages (e.g., rubygem-rmagick). -- Alex From gthiesfeld at gmail.com Wed Jul 25 16:49:16 2007 From: gthiesfeld at gmail.com (Gordon Thiesfeld) Date: Wed, 25 Jul 2007 15:49:16 -0500 Subject: [Rubygems-developers] improving gems bin scripts on windows Message-ID: I've been kicking this idea around for a while now, so I thought I'd get everyone's opinion on it. If it isn't a new idea, I apologize. Google didn't find anything on this mailing list. When you install a gem on windows, it creates two files in the bin dir, the bin script, and a .cmd file. The problem with this is when you try to exit out of some of these scripts, you get this message "Terminate batch job (Y/N)?". In the more recent versions of the one-click installer, the .rb and .rbw extension gets added to the PATHEXT environment variable (I believe), so windows will run these files if you type the name minus the extension. For instance, a file named chunky_bacon.rb will be executed by typing chunky_bacon. So, instead of creating two files in the bin dir - one without an extension, the other with a .cmd extension, I wonder if it would be better to create a single .rb file? The end result is fewer files in the bin directory, and not having to mess with the annoyances that the batch files cause. Thanks, Gordon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20070725/35d556ca/attachment.html From drbrain at segment7.net Wed Jul 25 17:44:38 2007 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 25 Jul 2007 14:44:38 -0700 Subject: [Rubygems-developers] Upgrading to new version of Ruby - what to do with gems? In-Reply-To: <46A7921F.1050806@att.net> References: <46A7921F.1050806@att.net> Message-ID: On Jul 25, 2007, at 11:10, Wes Gamble wrote: > I am currently on Ruby 1.8.4 on Windows XP. > > I'd like to move to 1.8.6 - do I need to reinstall all of my gems > or is > there a way for me to move them to my new 1.8.6 installation? Can > I just copy them to the new gems location? There is no new gems location. There is one repository for all of 1.8. -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars From drbrain at segment7.net Wed Jul 25 17:45:13 2007 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 25 Jul 2007 14:45:13 -0700 Subject: [Rubygems-developers] Platform selection in gem install In-Reply-To: <3945c4270707251241w11bc116evf47fe3f75b38973d@mail.gmail.com> References: <3945c4270706250943n1a2598c3y55fe0acd9b82e870@mail.gmail.com> <3945c4270706271828p372110eerfe37f15516baa9ba@mail.gmail.com> <3945c4270707251241w11bc116evf47fe3f75b38973d@mail.gmail.com> Message-ID: <3CD6AC31-9338-41CB-97F7-EF0311B61601@segment7.net> On Jul 25, 2007, at 12:41, Alexey Verkhovsky wrote: > On 7/25/07, Eric Hodel wrote: >>> I think that a command-line option is a good first step towards a >>> full >>> solution. If you agree, I will submit a patch. >> Have you been working on a patch? > > Not yet. > > For RubyWorks production stack project, we settled on packaging gems > as native packages (e.g., rubygem-rmagick). Ok. If you don't mind, I'll add the feature in the next week or two. -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars From drbrain at segment7.net Wed Jul 25 17:46:53 2007 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 25 Jul 2007 14:46:53 -0700 Subject: [Rubygems-developers] improving gems bin scripts on windows In-Reply-To: References: Message-ID: On Jul 25, 2007, at 13:49, Gordon Thiesfeld wrote: > I've been kicking this idea around for a while now, so I thought > I'd get everyone's opinion on it. > If it isn't a new idea, I apologize. Google didn't find anything > on this mailing list. > > When you install a gem on windows, it creates two files in the bin > dir, the bin script, and a .cmd file. The problem with this is > when you try to exit out of some of these scripts, you get this > message "Terminate batch job (Y/N)?". > > In the more recent versions of the one-click installer, the .rb > and .rbw extension gets added to the PATHEXT environment variable > (I believe), so windows will run these files if you type the name > minus the extension. For instance, a file named chunky_bacon.rb > will be executed by typing chunky_bacon. > > So, instead of creating two files in the bin dir - one without an > extension, the other with a .cmd extension, I wonder if it would be > better to create a single .rb file? The end result is fewer files > in the bin directory, and not having to mess with the annoyances > that the batch files cause. I'm for it. I don't think any of the rest of the RubyGems developers often develop on Windows, nor know what to look out for. Could you write a patch for us? -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars From ryand-ruby at zenspider.com Wed Jul 25 17:51:44 2007 From: ryand-ruby at zenspider.com (Ryan Davis) Date: Wed, 25 Jul 2007 14:51:44 -0700 Subject: [Rubygems-developers] Any experiences managing gems without root access? In-Reply-To: <356913E0-1EFC-4A35-ABF2-893FBD4C234A@segment7.net> References: <356913E0-1EFC-4A35-ABF2-893FBD4C234A@segment7.net> Message-ID: On Jul 25, 2007, at 11:09 , Eric Hodel wrote: > You can create an alternate RubyGems repository and install gems into > there using the GEM_HOME environment variable. I don't think that is right. GEM_HOME seems to be ... sketchy. I think you want GEM_PATH and to use the -i flag on 'gem install'... I got it working once and have a transcript with Jim where I worked it out. I plan on writing it up because it'll really help consultants. From gthiesfeld at gmail.com Wed Jul 25 18:08:22 2007 From: gthiesfeld at gmail.com (Gordon Thiesfeld) Date: Wed, 25 Jul 2007 17:08:22 -0500 Subject: [Rubygems-developers] improving gems bin scripts on windows In-Reply-To: References: Message-ID: > Could you write a patch for us? > Sure. I've been looking at the source, and I've got it working on my box, but I just realized I'm still using 0.9.2. I'm checking out from SVN now, and I'll take a look. Thanks From alexey.verkhovsky at gmail.com Wed Jul 25 18:08:41 2007 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Wed, 25 Jul 2007 16:08:41 -0600 Subject: [Rubygems-developers] Upgrading to new version of Ruby - what to do with gems? In-Reply-To: References: <46A7921F.1050806@att.net> Message-ID: <3945c4270707251508x3ee464f3m9bfe26c8bc904be3@mail.gmail.com> Everything related to gems, except rubygems package itself, is in /usr/lib/ruby/gems. If you have a 64-bit platform, some of it may be in /usr/lib64/ruby/gems. To preserve your installed gems you just need to keep this directory (or directories) intact, and make sure to re-install rubygems after you replace ruby. -- Alex From weyus at att.net Wed Jul 25 18:12:45 2007 From: weyus at att.net (Wes Gamble) Date: Wed, 25 Jul 2007 17:12:45 -0500 Subject: [Rubygems-developers] Upgrading to new version of Ruby - what to do with gems? In-Reply-To: References: <46A7921F.1050806@att.net> Message-ID: <46A7CADD.1040708@att.net> Sorry, when I said "gems location," I meant the gems directory embedded in the Ruby installation directory. My gem repository is in C:\ruby\lib\ruby\gems which is under my RUBY_HOME (C:\ruby). I plan to install Ruby to a new directory. When I do that, obviously I won't have access to my existing gems. Should I use GEM_HOME to move my gems to a "Ruby installation independent" location and then I should be able to see them from my new install, or do I need to copy my gems into my new Ruby installation? WG Eric Hodel wrote: > On Jul 25, 2007, at 11:10, Wes Gamble wrote: > >> I am currently on Ruby 1.8.4 on Windows XP. >> >> I'd like to move to 1.8.6 - do I need to reinstall all of my gems >> or is >> there a way for me to move them to my new 1.8.6 installation? Can >> I just copy them to the new gems location? >> > > There is no new gems location. There is one repository for all of 1.8. > > -- > Poor workers blame their tools. Good workers build better tools. The > best workers get their tools to do the work for them. -- Syndicate Wars > > > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > > From alexey.verkhovsky at gmail.com Wed Jul 25 18:18:24 2007 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Wed, 25 Jul 2007 16:18:24 -0600 Subject: [Rubygems-developers] Platform selection in gem install In-Reply-To: References: <3945c4270706250943n1a2598c3y55fe0acd9b82e870@mail.gmail.com> <3945c4270706271828p372110eerfe37f15516baa9ba@mail.gmail.com> <3945c4270707251241w11bc116evf47fe3f75b38973d@mail.gmail.com> <3CD6AC31-9338-41CB-97F7-EF0311B61601@segment7.net> <3945c4270707251455o791a8961yab9b552047587467@mail.gmail.com> Message-ID: <3945c4270707251518t11fd4484hdd691ac958091431@mail.gmail.com> Posting back to the list, hence the extensive quoting below. On 7/25/07, Eric Hodel wrote: > On Jul 25, 2007, at 14:55, Alexey Verkhovsky wrote: > > On 7/25/07, Eric Hodel wrote: > >> Ok. If you don't mind, I'll add the feature in the next week or two. > > > > No objections whatsoever. :) > > > > By the way, I have couple other wishes from our work on RubyWorks > > stack. We have to have our own gem repository there, and treat > > RuibyForge as an untrusted source): > > > 1. Get rid of sources.gem > > Maybe a hybrid approach? A sources .gem and a default fallback to > gems.rubyforge.org if the sources gem isn't installed? > There's some anti-foot-shooting code that's wrapped up in there too, > and I don't want people to shoot themselves in the foot. Silently defaulting to gems.rubyforge.org is OK. Configuring gem sources by installing a gem package, on the other hand, is a tad too hard to explain to a regular sysadmin, in my experience. I'd rather manage package sources by editing /etc/rubygems configuration file. Or, if we were to borrow a page from yum, by adding/deleting .repo files in /etc/rubygems/sources.d/ directory, but this may be too fancy. Yum does it this way so that a repository metadata can be a standalone file. > > 2. Make it possible to have a system-wide configuration file > > /etc/rubygems, which can be overridden by user-specific ~/.gemrc > > Yes. -- Alex From alexey.verkhovsky at gmail.com Wed Jul 25 18:20:25 2007 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Wed, 25 Jul 2007 16:20:25 -0600 Subject: [Rubygems-developers] Upgrading to new version of Ruby - what to do with gems? In-Reply-To: <46A7CADD.1040708@att.net> References: <46A7921F.1050806@att.net> <46A7CADD.1040708@att.net> Message-ID: <3945c4270707251520h3ea6cd61y4a83bc403a79df6@mail.gmail.com> On 7/25/07, Wes Gamble wrote: > Should I use GEM_HOME to move my gems to a "Ruby installation > independent" location and then I should be able to see them from my new > install, or do I need to copy my gems into my new Ruby installation? If I were you, I'd just copy the gems directory. Didn't notice that you said Windows. -- Alex From avatar at spellboundnet.com Thu Jul 26 18:17:00 2007 From: avatar at spellboundnet.com (Donavan Pantke) Date: Thu, 26 Jul 2007 18:17:00 -0400 Subject: [Rubygems-developers] proposal for solving the RPM/DEB vs. Gems battle Message-ID: <200707261817.00494.avatar@spellboundnet.com> After reading many old threads revolving around FHS specs, RPMs and DEBs and Gems, I thought of a way that the 2 could get together nicely. Before I go writing code to do it (the company I work for also looks to be interested in this, so it might be written by one of our real good Ruby coders.), I wanted to see if this sounds like something that Gems folks wouldn't balk at. Generally, Gems has taken a stance truly in the spirit of Plan9, which is that software is contained in an individual directory. This is real good for development and ease of management from a software perspective. FHS and LSB, etc, looks at the same problem from a systems management perspective, such as "can we have a single directory that we can tar up and be pretty certain that we've captured the config of the box? Answer: /etc". Both camps have good points, it just looks like there isn't one universal answer that both types of people can use effectively. So, what about making them compatible with each other? What I want to do is to introduce the concept of a VENDOR_HOME to Gems. This directory would be the location of all gems that were installed via foreign package management utilities. When doing a gem list, the list is compiled from both VENDOR_HOME and GEM_HOME. Gems would not install anything into VENDOR_HOME, and if directed to remove a gem in VENDOR_HOME, we can instruct the user that they have to use the third-party tool to remove the gem. The contents of the VENDOR_HOME directory will be a bunch of symlinks. The third-party packager can put all files into the proper directories for FHS compliance, and then symlink that directory or file into the proper place in the VENDOR_HOME structure. This satisfies everone's requirements, it just looks less than perfect on the file system. I think the VENDOR_HOME addition will be pretty easy to implement. What will be harder is actually doing the split install. My hope is that Gems can help packagers with that, too, by having some RPM spec/DEB control file creation. Is this something that could be incorporated into Gems? Thanks! Donavan Pantke From darix at web.de Thu Jul 26 19:13:10 2007 From: darix at web.de (Marcus Rueckert) Date: Fri, 27 Jul 2007 01:13:10 +0200 Subject: [Rubygems-developers] proposal for solving the RPM/DEB vs. Gems battle In-Reply-To: <200707261817.00494.avatar@spellboundnet.com> References: <200707261817.00494.avatar@spellboundnet.com> Message-ID: <20070726231310.GK4714@pixel.global-banlist.de> On 2007-07-26 18:17:00 -0400, Donavan Pantke wrote: > After reading many old threads revolving around FHS specs, RPMs and DEBs and > Gems, I thought of a way that the 2 could get together nicely. Before I go > writing code to do it (the company I work for also looks to be interested in > this, so it might be written by one of our real good Ruby coders.), I wanted > to see if this sounds like something that Gems folks wouldn't balk at. > > Generally, Gems has taken a stance truly in the spirit of Plan9, which > is > that software is contained in an individual directory. This is real good for > development and ease of management from a software perspective. FHS and LSB, > etc, looks at the same problem from a systems management perspective, such > as "can we have a single directory that we can tar up and be pretty certain > that we've captured the config of the box? Answer: /etc". Both camps have > good points, it just looks like there isn't one universal answer that both > types of people can use effectively. So, what about making them compatible > with each other? > > What I want to do is to introduce the concept of a VENDOR_HOME to > Gems. This > directory would be the location of all gems that were installed via foreign > package management utilities. When doing a gem list, the list is compiled > from both VENDOR_HOME and GEM_HOME. Gems would not install anything into > VENDOR_HOME, and if directed to remove a gem in VENDOR_HOME, we can instruct > the user that they have to use the third-party tool to remove the gem. > The contents of the VENDOR_HOME directory will be a bunch of symlinks. > The > third-party packager can put all files into the proper directories for FHS > compliance, and then symlink that directory or file into the proper place in > the VENDOR_HOME structure. This satisfies everone's requirements, it just > looks less than perfect on the file system. > > I think the VENDOR_HOME addition will be pretty easy to implement. > What will > be harder is actually doing the split install. My hope is that Gems can help > packagers with that, too, by having some RPM spec/DEB control file creation. > > Is this something that could be incorporated into Gems? there is already a vendor-ruby patch and i use that successfully. but gem itself has no notion of site-ruby or vendor-ruby at all atm. but as a packager i can say, this is not a problem. as gems barely overlap (only with scripts in the bindir). a point that might be more important for packagers are hooks to prevent gem from uninstalling files installed via rpm e.g. so if you package a gem inside an rpm. "gem uninstall" should not be able to remove it. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org From avatar at spellboundnet.com Thu Jul 26 20:32:32 2007 From: avatar at spellboundnet.com (Donavan Pantke) Date: Thu, 26 Jul 2007 20:32:32 -0400 Subject: [Rubygems-developers] proposal for solving the RPM/DEB vs. Gems battle In-Reply-To: <20070726231310.GK4714@pixel.global-banlist.de> References: <200707261817.00494.avatar@spellboundnet.com> <20070726231310.GK4714@pixel.global-banlist.de> Message-ID: <200707262032.32954.avatar@spellboundnet.com> On Thursday 26 July 2007 19:13, Marcus Rueckert wrote: > On 2007-07-26 18:17:00 -0400, Donavan Pantke wrote: > > After reading many old threads revolving around FHS specs, RPMs and DEBs > > and Gems, I thought of a way that the 2 could get together nicely. Before > > I go writing code to do it (the company I work for also looks to be > > interested in this, so it might be written by one of our real good Ruby > > coders.), I wanted to see if this sounds like something that Gems folks > > wouldn't balk at. > > > > Generally, Gems has taken a stance truly in the spirit of Plan9, > > which is > > that software is contained in an individual directory. This is real good > > for development and ease of management from a software perspective. FHS > > and LSB, etc, looks at the same problem from a systems management > > perspective, such as "can we have a single directory that we can tar up > > and be pretty certain that we've captured the config of the box? Answer: > > /etc". Both camps have good points, it just looks like there isn't one > > universal answer that both types of people can use effectively. So, what > > about making them compatible with each other? > > > > What I want to do is to introduce the concept of a VENDOR_HOME to > > Gems. This > > directory would be the location of all gems that were installed via > > foreign package management utilities. When doing a gem list, the list is > > compiled from both VENDOR_HOME and GEM_HOME. Gems would not install > > anything into VENDOR_HOME, and if directed to remove a gem in > > VENDOR_HOME, we can instruct the user that they have to use the > > third-party tool to remove the gem. The contents of the VENDOR_HOME > > directory will be a bunch of symlinks. The > > third-party packager can put all files into the proper directories for > > FHS compliance, and then symlink that directory or file into the proper > > place in the VENDOR_HOME structure. This satisfies everone's > > requirements, it just looks less than perfect on the file system. > > > > I think the VENDOR_HOME addition will be pretty easy to > > implement. What will > > be harder is actually doing the split install. My hope is that Gems can > > help packagers with that, too, by having some RPM spec/DEB control file > > creation. > > > > Is this something that could be incorporated into Gems? > > there is already a vendor-ruby patch and i use that successfully. but > gem itself has no notion of site-ruby or vendor-ruby at all atm. > > but as a packager i can say, this is not a problem. as gems barely > overlap (only with scripts in the bindir). That's true, if you're not an FHS purist (it's well known that Fedora and SuSE are not, but Debian and some others are). At that point it's not about overlapping, it's about pure location. > > a point that might be more important for packagers are hooks to prevent > gem from uninstalling files installed via rpm e.g. so if you package a > gem inside an rpm. "gem uninstall" should not be able to remove it. And this system would solve both problems: Debian folks could link things into FHS locations as necessary, and the gem uninstall behavior would protect repackaged gems. Also note that the symlink behavior is optional; Folks that are a little looser with FHS specs could place the real files into the VENDOR_HOME directory, people tight can just use symlinks. Donavan From darix at web.de Thu Jul 26 21:06:05 2007 From: darix at web.de (Marcus Rueckert) Date: Fri, 27 Jul 2007 03:06:05 +0200 Subject: [Rubygems-developers] proposal for solving the RPM/DEB vs. Gems battle In-Reply-To: <200707262032.32954.avatar@spellboundnet.com> References: <200707261817.00494.avatar@spellboundnet.com> <20070726231310.GK4714@pixel.global-banlist.de> <200707262032.32954.avatar@spellboundnet.com> Message-ID: <20070727010605.GM4714@pixel.global-banlist.de> On 2007-07-26 20:32:32 -0400, Donavan Pantke wrote: > > there is already a vendor-ruby patch and i use that successfully. but > > gem itself has no notion of site-ruby or vendor-ruby at all atm. > > > > but as a packager i can say, this is not a problem. as gems barely > > overlap (only with scripts in the bindir). > > That's true, if you're not an FHS purist (it's well known that Fedora and > SuSE are not, but Debian and some others are). At that point it's not about > overlapping, it's about pure location. than you would wont one dir for pure ruby gems and one for native extensions e.g. i am not sure you want to do that inside gem. another thing that works with ruby extension in general is to install native extensions for multiple architectures into one directory tree. thats something that doesnt work with gem either. > > a point that might be more important for packagers are hooks to prevent > > gem from uninstalling files installed via rpm e.g. so if you package a > > gem inside an rpm. "gem uninstall" should not be able to remove it. > > And this system would solve both problems: Debian folks could link things > into FHS locations as necessary, and the gem uninstall behavior would protect > repackaged gems. > Also note that the symlink behavior is optional; Folks that are a little > looser with FHS specs could place the real files into the VENDOR_HOME > directory, people tight can just use symlinks. i think installing into VENDOR_HOME and symlinking back to the normal location would be the better way. that way gem uninstall could just skip all gems which are installed into the VENDOR_HOME dir. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org From gthiesfeld at gmail.com Mon Jul 30 13:44:09 2007 From: gthiesfeld at gmail.com (Gordon Thiesfeld) Date: Mon, 30 Jul 2007 12:44:09 -0500 Subject: [Rubygems-developers] improving gems bin scripts on windows In-Reply-To: References: Message-ID: > > Could you write a patch for us? I've written the patch, and I've been using it for a few days now. I think I've figured out why the batch files are used. Everything works fine if you call the ruby file directly, but if you try to pipe something to it, it raises an exception "Bad file descriptor (Errno::EBADF)". The original method of using batch files works fine with the pipe operator. I found this thread on ruby-talk[1] as well as several other threads for python that say this is a bug with the pipe operator in windows. So, I guess this isn't going to work. Oh well, it was worth a shot. Thanks, Gordon [1]: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/193379 From drbrain at segment7.net Mon Jul 30 14:02:20 2007 From: drbrain at segment7.net (Eric Hodel) Date: Mon, 30 Jul 2007 11:02:20 -0700 Subject: [Rubygems-developers] improving gems bin scripts on windows In-Reply-To: References: Message-ID: <0BB05D62-D194-464A-BF28-272734E7216D@segment7.net> On Jul 30, 2007, at 10:44, Gordon Thiesfeld wrote: >>> Could you write a patch for us? > > I've written the patch, and I've been using it for a few days now. I > think I've figured out why the batch files are used. Everything works > fine if you call the ruby file directly, but if you try to pipe > something to it, it raises an exception "Bad file descriptor > (Errno::EBADF)". The original method of using batch files works fine > with the pipe operator. > > I found this thread on ruby-talk[1] as well as several other threads > for python that say this is a bug with the pipe operator in windows. > > So, I guess this isn't going to work. Oh well, it was worth a shot. Lame. Thanks for investigating for us. I've added a note to the RDoc so people will know in the future why we've got two scripts lying around. -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars From jabberwock at tenebrous.com Mon Jul 30 14:41:30 2007 From: jabberwock at tenebrous.com (Michael Behan) Date: Mon, 30 Jul 2007 14:41:30 -0400 Subject: [Rubygems-developers] Time.at in Windows Message-ID: <46AE30DA.5070003@tenebrous.com> Hello! If this has been brought up on the list already, please forgive the repetition. I noticed that the addons to the Time class fail in Windows where they don't in OS-X or Linux. For instance, Time.at(-1) throws and argument error, and Time.at('1966-06-01 12:00:00') throws and out of range error. I'm guessing Windows does not like time outside the boundaries of the Epoch? Thanks JW From Daniel.Berger at qwest.com Mon Jul 30 15:15:35 2007 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Mon, 30 Jul 2007 14:15:35 -0500 Subject: [Rubygems-developers] Time.at in Windows In-Reply-To: <46AE30DA.5070003@tenebrous.com> Message-ID: <7524A45A1A5B264FA4809E2156496CFBE72D0D@ITOMAE2KM01.AD.QINTRA.COM> > -----Original Message----- > From: rubygems-developers-bounces at rubyforge.org > [mailto:rubygems-developers-bounces at rubyforge.org] On Behalf > Of Michael Behan > Sent: Monday, July 30, 2007 12:42 PM > To: rubygems-developers at rubyforge.org > Subject: [Rubygems-developers] Time.at in Windows > > > Hello! > > If this has been brought up on the list already, please > forgive the repetition. > > I noticed that the addons to the Time class fail in Windows > where they don't in OS-X or Linux. > > For instance, Time.at(-1) throws and argument error, and > Time.at('1966-06-01 12:00:00') throws and out of range error. > > I'm guessing Windows does not like time outside the > boundaries of the Epoch? Correct, but I'm not sure it's limited to Windows. But, what does this have to do with rubygems? Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From jabberwock at tenebrous.com Mon Jul 30 15:41:59 2007 From: jabberwock at tenebrous.com (Michael Behan) Date: Mon, 30 Jul 2007 15:41:59 -0400 Subject: [Rubygems-developers] Time.at in Windows In-Reply-To: <7524A45A1A5B264FA4809E2156496CFBE72D0D@ITOMAE2KM01.AD.QINTRA.COM> References: <7524A45A1A5B264FA4809E2156496CFBE72D0D@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <46AE3F07.60906@tenebrous.com> Time.parse is part of rubygems, correct? The behavior is the same with this method. I apologize if I am asking in the wrong place. Berger, Daniel wrote: >> -----Original Message----- >> From: rubygems-developers-bounces at rubyforge.org >> [mailto:rubygems-developers-bounces at rubyforge.org] On Behalf >> Of Michael Behan >> Sent: Monday, July 30, 2007 12:42 PM >> To: rubygems-developers at rubyforge.org >> Subject: [Rubygems-developers] Time.at in Windows >> >> >> Hello! >> >> If this has been brought up on the list already, please >> forgive the repetition. >> >> I noticed that the addons to the Time class fail in Windows >> where they don't in OS-X or Linux. >> >> For instance, Time.at(-1) throws and argument error, and >> Time.at('1966-06-01 12:00:00') throws and out of range error. >> >> I'm guessing Windows does not like time outside the >> boundaries of the Epoch? >> > > Correct, but I'm not sure it's limited to Windows. > > But, what does this have to do with rubygems? > > Dan > > > This communication is the property of Qwest and may contain confidential or > privileged information. Unauthorized use of this communication is strictly > prohibited and may be unlawful. If you have received this communication > in error, please immediately notify the sender by reply e-mail and destroy > all copies of the communication and any attachments. > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20070730/efd8f70e/attachment.html From drbrain at segment7.net Mon Jul 30 17:11:15 2007 From: drbrain at segment7.net (Eric Hodel) Date: Mon, 30 Jul 2007 14:11:15 -0700 Subject: [Rubygems-developers] Time.at in Windows In-Reply-To: <46AE3F07.60906@tenebrous.com> References: <7524A45A1A5B264FA4809E2156496CFBE72D0D@ITOMAE2KM01.AD.QINTRA.COM> <46AE3F07.60906@tenebrous.com> Message-ID: <3864E6E3-5A91-4B03-ADFB-05291535BA01@segment7.net> PS: Don't top post. On Jul 30, 2007, at 12:41, Michael Behan wrote: > Time.parse is part of rubygems, correct? The behavior is the same > with this method. I apologize if I am asking in the wrong place. Nope. It is in the standard library. Time.at raises a TypeError when you pass it a String. -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars From jabberwock at tenebrous.com Tue Jul 31 01:06:20 2007 From: jabberwock at tenebrous.com (The Jabberwock) Date: Tue, 31 Jul 2007 01:06:20 -0400 Subject: [Rubygems-developers] Time.at in Windows In-Reply-To: <3864E6E3-5A91-4B03-ADFB-05291535BA01@segment7.net> References: <7524A45A1A5B264FA4809E2156496CFBE72D0D@ITOMAE2KM01.AD.QINTRA.COM> <46AE3F07.60906@tenebrous.com> <3864E6E3-5A91-4B03-ADFB-05291535BA01@segment7.net> Message-ID: <46AEC34C.50606@tenebrous.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Forgive my lack of cyber linguistics as I do not know what a "top post" is. I'm unsubscribing from this list as my question has been answered. Peace, and take care. JW Eric Hodel wrote: > PS: Don't top post. > > On Jul 30, 2007, at 12:41, Michael Behan wrote: > >> Time.parse is part of rubygems, correct? The behavior is the same >> with this method. I apologize if I am asking in the wrong place. > > Nope. It is in the standard library. > > Time.at raises a TypeError when you pass it a String. > > -- > Poor workers blame their tools. Good workers build better tools. The > best workers get their tools to do the work for them. -- Syndicate Wars > > > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGrsNMYUsvh+hDb0ARAsMNAJ4uL9Y1ClyrBbK94+ZmlNa83Os1CwCdGbub 894BcrNsmJUva/HnOWYxEjk= =4KFM -----END PGP SIGNATURE----- From zigxxx at gmail.com Tue Jul 31 01:16:26 2007 From: zigxxx at gmail.com (i am zigx) Date: Mon, 30 Jul 2007 22:16:26 -0700 Subject: [Rubygems-developers] Error with datetime_select w/ Year <1970 on MS Windows Message-ID: <27d979510707302216p393ca33fqa51637ac247d5b92@mail.gmail.com> I am seeing something very strange that does not appear to happen on OSX. Can anyone confirm if this is a valid issue/bug? I have created a datetime_select with the following code: <%= datetime_select(:album, :release_date, :start_year => 1960) %> When i select any year 1970 and above the submit form works fine and i can debug(:params) no prob... but if i submit 1969 and older, I get the following: ActiveRecord::MultiparameterAssignmentErrors in PublicController#create 1 error(s) on assignment of multiparameter attributes c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:2094:in `execute_callstack_for_multiparameter_attributes' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:2074:in `assign_multiparameter_attributes' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1675:in `attributes=' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1505:in `initialize_without_callbacks' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:225:in `initialize' #{RAILS_ROOT}/app/controllers/public_controller.rb:39:in `new' #{RAILS_ROOT}/app/controllers/public_controller.rb:39:in `create' Request Parameters: {"commit"=>"Create", "album"=>{"artist"=>"Jimi Hendrix", "title"=>"Electric Lady Land", "release_date(1i)"=>"1969", "release_date(2i)"=>"12", "release_date(3i)"=>"31", "genre"=>"Rock", "release_date(4i)"=>"00", "release_date(5i)"=>"00"}} Here is my version information: About your application's environment Ruby version 1.8.6 (i386-mswin32) RubyGems version 0.9.2 Rails version 1.2.3 Active Record version 1.15.3 Action Pack version 1.13.3 Action Web Service version 1.2.3 Action Mailer version 1.3.3 Active Support version 1.4.2 Application root C:/railz/music_library Environment development Database adapter mysql Database schema version 0 Controller Code: def new @album = Album.new @album.title = 'Electric Lady Land' end View Code: <%= start_form_tag(:action => 'create') %> Title: <%= text_field(:album, :title) %>
Artist: <%= text_field(:album, :artist) %>
Genre: <%= text_field(:album, :genre) %>
Release Date: <%= datetime_select(:album, :release_date, :start_year => 1960) %>

<%= submit_tag("Create") %> <%= end_form_tag %> Thank you all for your time, and my apologies if this is ridiculously newbie-ish. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20070730/e56e9f3a/attachment.html From drbrain at segment7.net Tue Jul 31 02:40:29 2007 From: drbrain at segment7.net (Eric Hodel) Date: Mon, 30 Jul 2007 23:40:29 -0700 Subject: [Rubygems-developers] Error with datetime_select w/ Year <1970 on MS Windows In-Reply-To: <27d979510707302216p393ca33fqa51637ac247d5b92@mail.gmail.com> References: <27d979510707302216p393ca33fqa51637ac247d5b92@mail.gmail.com> Message-ID: <84426E92-FB28-46C9-9C0E-6EF82BAD2CDB@segment7.net> On Jul 30, 2007, at 22:16, i am zigx wrote: > I am seeing something very strange that does not appear to happen > on OSX. Can anyone confirm if this is a valid issue/bug? > > > I have created a datetime_select with the following code: > <%= datetime_select(:album, :release_date, :start_year => 1960) %> Try the Rails mailing list. This list is for the development of RubyGems. rubyonrails-talk at googlegroups.com -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars