From jim.weirich at gmail.com Wed Oct 1 00:06:29 2008 From: jim.weirich at gmail.com (Jim Weirich) Date: Wed, 1 Oct 2008 00:06:29 -0400 Subject: [Rubygems-developers] Gem Names not correlated to require name In-Reply-To: <5cd596d60809302050p45959419i46309fcef7df4853@mail.gmail.com> References: <5cd596d60809301214r182d15f8i1dfd7af1fc9abc41@mail.gmail.com> <67dd69ee-fa72-46ae-97f3-dd86b99a0efe@i76g2000hsf.googlegroups.com> <5cd596d60809301351j176a495cj1ea011046c03c71c@mail.gmail.com> <5cd596d60809301803l6dab4163h74dcd8b81eaa8b38@mail.gmail.com> <9e7db9110809301853n66e4f9a7w3b02bc559852499e@mail.gmail.com> <5cd596d60809301945y24cf023ev44818d601f536f21@mail.gmail.com> <50FBC892-2221-4328-86F4-FC85C95F7BA0@gmail.com> <5cd596d60809302050p45959419i46309fcef7df4853@mail.gmail.com> Message-ID: <5F344FB8-869D-442D-A1BC-FAB28C4EE7AC@gmail.com> On Sep 30, 2008, at 11:50 PM, Jim Freeze wrote: > On Tue, Sep 30, 2008 at 10:26 PM, Jim Weirich > wrote: >> >> Are you asking for this: >> >> def bunny_foo_foo(gem_name) >> gem gem_name >> require the_default_load_file_for_gem(gem_name) >> end > > I am not up to speed with the exact nature of gem. Is it the same as: > > def bunny_foo_foo(gem_name) > require 'rubygems' > require the_default_load_file_for_gem(gem_name) > end No, it does neither of those two things. > I'm assuming the gem bascially stages a gem for later requiring. That is a good description of it. It accomplishes that by arranging the Ruby load path so that a normal ruby require will find the proper files stored in the gem. >> or are you asking for: >> >> def bunny_foo_foo(gem_name) >> require the_default_load_file_for_gem(gem_name) >> end > > One way to write this would be to > def bunny_foo_foo(gem_name) > require File.join(path_to(gem_name), "lib/bootstrap") > end Interesting. I would suggest that the bootstrap file NOT be located in the lib directory (nor the bin directory), but be located somewhere that will not be put on the load path. This will prevent accidental loading of the file. I'm still not sure what advantage this has over a simple convention of providing a base require file using the same name as the gem. -- -- Jim Weirich -- jim.weirich at gmail.com From rubygems at freeze.org Wed Oct 1 00:29:35 2008 From: rubygems at freeze.org (Jim Freeze) Date: Tue, 30 Sep 2008 23:29:35 -0500 Subject: [Rubygems-developers] Gem Names not correlated to require name In-Reply-To: <5F344FB8-869D-442D-A1BC-FAB28C4EE7AC@gmail.com> References: <5cd596d60809301214r182d15f8i1dfd7af1fc9abc41@mail.gmail.com> <67dd69ee-fa72-46ae-97f3-dd86b99a0efe@i76g2000hsf.googlegroups.com> <5cd596d60809301351j176a495cj1ea011046c03c71c@mail.gmail.com> <5cd596d60809301803l6dab4163h74dcd8b81eaa8b38@mail.gmail.com> <9e7db9110809301853n66e4f9a7w3b02bc559852499e@mail.gmail.com> <5cd596d60809301945y24cf023ev44818d601f536f21@mail.gmail.com> <50FBC892-2221-4328-86F4-FC85C95F7BA0@gmail.com> <5cd596d60809302050p45959419i46309fcef7df4853@mail.gmail.com> <5F344FB8-869D-442D-A1BC-FAB28C4EE7AC@gmail.com> Message-ID: <5cd596d60809302129q3f6daf95n75ef0b5795f5626e@mail.gmail.com> On Tue, Sep 30, 2008 at 11:06 PM, Jim Weirich wrote: > On Sep 30, 2008, at 11:50 PM, Jim Freeze wrote: >> > Interesting. I would suggest that the bootstrap file NOT be located in the > lib directory (nor the bin directory), but be located somewhere that will > not be put on the load path. This will prevent accidental loading of the > file. That's a good idea. > I'm still not sure what advantage this has over a simple convention of > providing a base require file using the same name as the gem. I'm not convinced yet either. It has been said several times that it is not the responsibility of rubygems to ensure that the gem name and the require name correspond to each other or may be derived. But what if a notice/warning was generated by rubygems during building of a gem if it did not find a filename that is not the same as the gem name. So, developers can do things like: sudo gem install active_record gem 'active_record' require 'active_record' or sudo gem install CommandLine gem 'CommandLine' require 'CommandLine' instead of sudo gem install CommandLine gem 'CommandLine' require 'commandline' -- Jim Freeze From hgs at dmu.ac.uk Wed Oct 1 06:19:44 2008 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Wed, 1 Oct 2008 11:19:44 +0100 (BST) Subject: [Rubygems-developers] Gem Names not correlated to require name In-Reply-To: <5cd596d60809302058k562f73e2qa75b92a4a11bc7c5@mail.gmail.com> References: <5cd596d60809301214r182d15f8i1dfd7af1fc9abc41@mail.gmail.com> <67dd69ee-fa72-46ae-97f3-dd86b99a0efe@i76g2000hsf.googlegroups.com> <5cd596d60809301351j176a495cj1ea011046c03c71c@mail.gmail.com> <5cd596d60809301803l6dab4163h74dcd8b81eaa8b38@mail.gmail.com> <9e7db9110809301853n66e4f9a7w3b02bc559852499e@mail.gmail.com> <5cd596d60809301945y24cf023ev44818d601f536f21@mail.gmail.com> <71166b3b0809302009r4fcd4312x3d1b8a1a6f45110@mail.gmail.com> <5cd596d60809302058k562f73e2qa75b92a4a11bc7c5@mail.gmail.com> Message-ID: On Tue, 30 Sep 2008, Jim Freeze wrote: > On Tue, Sep 30, 2008 at 10:09 PM, Luis Lavena wrote: > > > Ok, let forget about bunny_foo_foo, require_gem and all that, let's > > heard the complains. > > The basic complaint is the require filename cannot be determined from > the gem name. > Does it help that they can %> gem server and point their browser at http://localhost:8808/ to see a web page with all the gems and links to docs listed? There will probably be complaints from the same users that this is a bit obscure. Maybe the attached doc patch is of use? Hugh -------------- next part -------------- --- rubygems-1.3.0/lib/rubygems/command.rb.orig 2008-06-17 22:25:54.000000000 +0100 +++ rubygems-1.3.0/lib/rubygems/command.rb 2008-10-01 11:15:52.375000000 +0100 @@ -392,6 +392,9 @@ gem help platforms show information about platforms gem help show help on COMMAND (e.g. 'gem help install') + gem server present a web page at + http://localhost:8808/ + with info about installed gems. Further information: http://rubygems.rubyforge.org }.gsub(/^ /, "") From drbrain at segment7.net Wed Oct 1 14:56:57 2008 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 1 Oct 2008 11:56:57 -0700 Subject: [Rubygems-developers] Gem Names not correlated to require name In-Reply-To: <5cd596d60809302129q3f6daf95n75ef0b5795f5626e@mail.gmail.com> References: <5cd596d60809301214r182d15f8i1dfd7af1fc9abc41@mail.gmail.com> <67dd69ee-fa72-46ae-97f3-dd86b99a0efe@i76g2000hsf.googlegroups.com> <5cd596d60809301351j176a495cj1ea011046c03c71c@mail.gmail.com> <5cd596d60809301803l6dab4163h74dcd8b81eaa8b38@mail.gmail.com> <9e7db9110809301853n66e4f9a7w3b02bc559852499e@mail.gmail.com> <5cd596d60809301945y24cf023ev44818d601f536f21@mail.gmail.com> <50FBC892-2221-4328-86F4-FC85C95F7BA0@gmail.com> <5cd596d60809302050p45959419i46309fcef7df4853@mail.gmail.com> <5F344FB8-869D-442D-A1BC-FAB28C4EE7AC@gmail.com> <5cd596d60809302129q3f6daf95n75ef0b5795f5626e@mail.gmail.com> Message-ID: On Sep 30, 2008, at 21:29 PM, Jim Freeze wrote: > On Tue, Sep 30, 2008 at 11:06 PM, Jim Weirich > wrote: >> I'm still not sure what advantage this has over a simple convention >> of >> providing a base require file using the same name as the gem. > > I'm not convinced yet either. > > It has been said several times that it is not the responsibility of > rubygems to ensure that the gem name and the require name correspond > to each other or may be derived. But what if a notice/warning was > generated by rubygems during building of a gem if it did not find a > filename that is not the same as the gem name. Can you file a feature request for this? It's easy to add, but I don't have much time to work on RubyGems right now. From rubygems at freeze.org Wed Oct 1 15:16:49 2008 From: rubygems at freeze.org (Jim Freeze) Date: Wed, 1 Oct 2008 14:16:49 -0500 Subject: [Rubygems-developers] Gem Names not correlated to require name In-Reply-To: References: <5cd596d60809301214r182d15f8i1dfd7af1fc9abc41@mail.gmail.com> <5cd596d60809301803l6dab4163h74dcd8b81eaa8b38@mail.gmail.com> <9e7db9110809301853n66e4f9a7w3b02bc559852499e@mail.gmail.com> <5cd596d60809301945y24cf023ev44818d601f536f21@mail.gmail.com> <50FBC892-2221-4328-86F4-FC85C95F7BA0@gmail.com> <5cd596d60809302050p45959419i46309fcef7df4853@mail.gmail.com> <5F344FB8-869D-442D-A1BC-FAB28C4EE7AC@gmail.com> <5cd596d60809302129q3f6daf95n75ef0b5795f5626e@mail.gmail.com> Message-ID: <5cd596d60810011216m7e1c311fx640524576ce258f2@mail.gmail.com> On Wed, Oct 1, 2008 at 1:56 PM, Eric Hodel wrote: > On Sep 30, 2008, at 21:29 PM, Jim Freeze wrote: >> > Can you file a feature request for this? It's easy to add, but I don't have > much time to work on RubyGems right now. Submitted -- Jim Freeze From thewoolleyman at gmail.com Fri Oct 3 03:45:01 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Fri, 3 Oct 2008 00:45:01 -0700 Subject: [Rubygems-developers] Bugs with ~/.gemrc gemhome and gempath overrides not being respected Message-ID: I'm experimenting with trying to force RubyGems to only load gems out of ~/.gem - to ignore any system installed gems - the goal being to facilitate a smooth sudo-less gems environment. There's a couple of problems I'm seeing. If these are confirmed as bugs, I'll open tickets and try to come up with some failing tests. First, there is some confusion over whether the 'gempath' and 'gemhome' keys should be strings or symbols. Looking through config_file.rb and environment_command.rb, there are inconsistencies. You will also get different results from Gem.path and `gem env` depending on whether you use strings or symbols Next, there are problems on Leopard where the overrides in .gemrc will be overridden (if APPLE_GEM_HOME or RUBY_FRAMEWORK_VERSION exist). The settings in .gemrc should always take precedence, I would think. Thanks, -- Chad -------------- next part -------------- An HTML attachment was scrubbed... URL: From technomancy at gmail.com Fri Oct 3 13:25:14 2008 From: technomancy at gmail.com (Phil Hagelberg) Date: Fri, 03 Oct 2008 10:25:14 -0700 Subject: [Rubygems-developers] Bugs with ~/.gemrc gemhome and gempath overrides not being respected In-Reply-To: (Chad Woolley's message of "Fri, 3 Oct 2008 00:45:01 -0700") References: Message-ID: <873ajd616t.fsf@hagelb.org> "Chad Woolley" writes: > First, there is some confusion over whether the 'gempath' and > 'gemhome' keys should be strings or symbols. Looking through > config_file.rb and environment_command.rb, there are inconsistencies. > You will also get different results from Gem.path and `gem env` > depending on whether you use strings or symbols It's my understanding they should always be symbols, but I could be wrong here. I looked through environment_command.rb, and I don't see any reference to string versions; could you point them out? > Next, there are problems on Leopard where the overrides in .gemrc will > be overridden (if APPLE_GEM_HOME or RUBY_FRAMEWORK_VERSION exist). > The settings in .gemrc should always take precedence, I would think. I can't speak for Mac users and the motivations behind those overrides, but it does look like Gem.dir gets added to the path whether you want it or not (Gem.set_paths in lib/rubygems.rb; currently at line 704). I'm not sure why this is the case; should it be removed? I did also notice that Gem.dir does not respect the values in ~/.gemrc, so I've made it use :gemhome from the config file if present. This seems to be the right thing to do since it also checks ENV['GEM_HOME']. With this addition, you should be able to ignore system-level gems using only the config file modulo problems with Apple's installation. -Phil From thewoolleyman at gmail.com Fri Oct 3 13:47:25 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Fri, 3 Oct 2008 10:47:25 -0700 Subject: [Rubygems-developers] Bugs with ~/.gemrc gemhome and gempath overrides not being respected In-Reply-To: <873ajd616t.fsf@hagelb.org> References: <873ajd616t.fsf@hagelb.org> Message-ID: On Fri, Oct 3, 2008 at 10:25 AM, Phil Hagelberg wrote: Thanks for helping with this. > It's my understanding they should always be symbols, but I could be > wrong here. I looked through environment_command.rb, and I don't see any > reference to string versions; could you point them out? > Hmm, it seem to be working OK with the symbols now. Maybe it was something related to the config home not being exposed. > > > Next, there are problems on Leopard where the overrides in .gemrc will > > be overridden (if APPLE_GEM_HOME or RUBY_FRAMEWORK_VERSION exist). > > The settings in .gemrc should always take precedence, I would think. > > I can't speak for Mac users and the motivations behind those overrides, > but it does look like Gem.dir gets added to the path whether you want it > or not (Gem.set_paths in lib/rubygems.rb; currently at line 704). I'm > not sure why this is the case; should it be removed? > I'm talking about rubygems.rb line 514: if defined?(APPLE_GEM_HOME) and not ENV['GEM_PATH'] then This will always put the apple system dirs on your paths, even if you've explicitly excluded them from your paths in .gemrc. I think it should instead be something like this: if defined?(APPLE_GEM_HOME) and (not ENV['GEM_PATH'] and not Gem.configuration.path) then There are also still issues with source index not respecting this, but I'll put that in a separate thread. -- Chad -------------- next part -------------- An HTML attachment was scrubbed... URL: From thewoolleyman at gmail.com Fri Oct 3 13:55:53 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Fri, 3 Oct 2008 10:55:53 -0700 Subject: [Rubygems-developers] Bugs with ~/.gemrc gemhome and gempath overrides not being respected In-Reply-To: References: <873ajd616t.fsf@hagelb.org> Message-ID: On Fri, Oct 3, 2008 at 10:47 AM, Chad Woolley wrote: > On Fri, Oct 3, 2008 at 10:25 AM, Phil Hagelberg wrote: > > Thanks for helping with this. > > >> It's my understanding they should always be symbols, but I could be >> wrong here. I looked through environment_command.rb, and I don't see any >> reference to string versions; could you point them out? >> > > Hmm, it seem to be working OK with the symbols now. Maybe it was something > related to the config home not being exposed. > OK, I reproduced this now. It is when you do a 'gem list'. Unless you have the non-symbol version (line not starting with a colon) for gemhome and/or gempath, you will get the extra gems installed in the system dir. Not positive if this is related to the Apple stuff, but it is definitely inconsistent between the symbol and non-symbol. This may be related to the issues with SourceIndex not respecting this stuff, I'm composing that thread now. -- Chad -------------- next part -------------- An HTML attachment was scrubbed... URL: From thewoolleyman at gmail.com Fri Oct 3 13:58:59 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Fri, 3 Oct 2008 10:58:59 -0700 Subject: [Rubygems-developers] SourceIndex not respecting gemhome/gempath entries on ~/.gemrc Message-ID: This is with the latest trunk r1895. $ cat ~/.gemrc :gemhome: /Users/woolley/.gem/ruby/1.8 :gempath: - /Users/woolley/.gem/ruby/1.8 $ gem env RubyGems Environment: - INSTALLATION DIRECTORY: /Users/woolley/.gem/ruby/1.8 - EXECUTABLE DIRECTORY: /Users/woolley/.gem/ruby/1.8/bin - GEM PATHS: - /Users/woolley/.gem/ruby/1.8 - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 # NOTE: These are just the gems under ~/.gem, and I must have the non-symbol entries for gemhome and gempath in gemrc to get just these gems. $ gem list *** LOCAL GEMS *** cmdparse (2.0.2) facets (2.4.3) geminstaller (0.4.5) gettalong-webgen (0.5.5.20081001) github (0.1.1) hoe (1.7.0) launchy (0.3.2) maruku (0.5.9) rack (0.4.0) rake (0.8.3) ramaze (2008.06) RedCloth (4.0.4) sake (1.0.15) Selenium (1.1.14) syntax (1.0.0) webgen (0.4.2) # This picked up all the gems, including the ones in my system dir - not just the ones listed above which are in ~/.gem $ irb >> si = Gem::SourceIndex.from_installed_gems >> d = Gem::Dependency.new('', '>=0') >> si.search(d).map {|s| s.name} => ["RedCloth", "RedCloth", "Selenium", "actionmailer", "actionmailer", "actionpack", "actionpack", "actionwebservice", "actionwebservice", "activerecord", "activerecord", "activesupport", "activesupport", "acts_as_ferret", "capistrano", "cgi_multipart_eof_fix", "cgi_multipart_eof_fix", "cmdparse", "daemons", "daemons", "dnssd", "facets", "fastthread", "fastthread", "fcgi", "ferret", "gem_plugin", "gem_plugin", "geminstaller", "gettalong-webgen", "github", "highline", "hoe", "hpricot", "launchy", "libxml-ruby", "maruku", "mongrel", "needle", "net-sftp", "net-ssh", "rack", "rails", "rails", "rake", "rake", "ramaze", "ruby-openid", "ruby-yadis", "rubynode", "sake", "sources", "sqlite3-ruby", "syntax", "termios", "webgen"] -------------- next part -------------- An HTML attachment was scrubbed... URL: From transfire at gmail.com Thu Oct 9 11:29:15 2008 From: transfire at gmail.com (Trans) Date: Thu, 9 Oct 2008 08:29:15 -0700 (PDT) Subject: [Rubygems-developers] Gem methods? Message-ID: <0bcb3430-bd02-47d9-8642-5f636be303d6@n1g2000prb.googlegroups.com> Is there a way to see if a gem is active (without activating it of course)? In addition is there a way to access a gemspec from code? Lastly, is there a way to get the path to where a gem is installed? Thanks, T From thewoolleyman at gmail.com Thu Oct 9 12:06:59 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Thu, 9 Oct 2008 09:06:59 -0700 Subject: [Rubygems-developers] Gem methods? In-Reply-To: <0bcb3430-bd02-47d9-8642-5f636be303d6@n1g2000prb.googlegroups.com> References: <0bcb3430-bd02-47d9-8642-5f636be303d6@n1g2000prb.googlegroups.com> Message-ID: On Thu, Oct 9, 2008 at 8:29 AM, Trans wrote: > Is there a way to see if a gem is active (without activating it of > course)? > Hmm. Check if it is on the load path. Not sure how to check through the API. > > In addition is there a way to access a gemspec from code? > Yes, you can use the API to run all rubygems commands and get Specification objects. Check out GemRunner, that is the external API to use. I just posted an example of this recently in the thread about the .gemrc stuff. > > Lastly, is there a way to get the path to where a gem is installed? > The 'which' command, which should also be available via the API. -- Chad -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeremy at hinegardner.org Thu Oct 9 13:18:19 2008 From: jeremy at hinegardner.org (Jeremy Hinegardner) Date: Thu, 9 Oct 2008 11:18:19 -0600 Subject: [Rubygems-developers] Gem methods? In-Reply-To: <0bcb3430-bd02-47d9-8642-5f636be303d6@n1g2000prb.googlegroups.com> References: <0bcb3430-bd02-47d9-8642-5f636be303d6@n1g2000prb.googlegroups.com> Message-ID: <20081009171819.GV27162@hinegardner.org> On Thu, Oct 09, 2008 at 08:29:15AM -0700, Trans wrote: > Is there a way to see if a gem is active (without activating it of > course)? Looking at the rubygems code for Gem.activate I'm assuming that an 'active' gem means that the spec.require_paths have been added to $LOAD_PATH. Without examining $LOAD_PATH there is an @loaded_specs member variable of the Gem module you could acces, but it is not publicly available. Using the API, take a bit of the code from Gem.activate and use it. require 'rubygems' def is_active?( name, version_req = ::Gem::Requirement.default ) dep = ::Gem::Dependency.new( name, version_req ) idx = Gem::SourceIndex.from_gems_in( *Gem::SourceIndex.installed_spec_directories ) matches = idx.find_name( dep.name, dep.version_requirements ) matches.each do |spec| spec.require_paths.each do |req_path| req_path = File.join( spec.full_gem_path, req_path ) if $LOAD_PATH.include?( req_path ) then return req_path end end end return false end puts "Is the configuration gem loaded ? : #{is_active?( 'configuration' )}" # => false require 'configuration' puts "Is the configuration gem loaded ? : #{is_active?( 'configuration' )}" # => /opt/local/lib/ruby/gems/1.8/gems/configuration-0.0.5/lib > In addition is there a way to access a gemspec from code? See the first 3 lines of the is_active? method above for a way to search for a gemspec. > Lastly, is there a way to get the path to where a gem is installed? Given that you found the spec above, you can do 'spec.full_gem_path' Or if you want all of them: Gem.source_index.each do |full_name, spec| puts "#{full_name} is installed in #{spec.full_gem_path}" end > > Thanks, > T enjoy, -jeremy -- ======================================================================== Jeremy Hinegardner jeremy at hinegardner.org From jbarnette at gmail.com Thu Oct 9 13:53:20 2008 From: jbarnette at gmail.com (John Barnette) Date: Thu, 9 Oct 2008 10:53:20 -0700 Subject: [Rubygems-developers] Gem methods? In-Reply-To: <0bcb3430-bd02-47d9-8642-5f636be303d6@n1g2000prb.googlegroups.com> References: <0bcb3430-bd02-47d9-8642-5f636be303d6@n1g2000prb.googlegroups.com> Message-ID: <2bce3eb60810091053s623b5297m3380edea38c838b6@mail.gmail.com> Hi, On Thu, Oct 9, 2008 at 8:29 AM, Trans wrote: > Is there a way to see if a gem is active (without activating it of > course)? I added Gem.available? in 1.2, which might do what you want. ~ j. From thewoolleyman at gmail.com Thu Oct 9 14:20:31 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Thu, 9 Oct 2008 11:20:31 -0700 Subject: [Rubygems-developers] Gem methods? In-Reply-To: <20081009171819.GV27162@hinegardner.org> References: <0bcb3430-bd02-47d9-8642-5f636be303d6@n1g2000prb.googlegroups.com> <20081009171819.GV27162@hinegardner.org> Message-ID: On Thu, Oct 9, 2008 at 10:18 AM, Jeremy Hinegardner wrote: > > > In addition is there a way to access a gemspec from code? > > See the first 3 lines of the is_active? method above for a way to search > for a gemspec. > I think Gem::SourceIndex.from_installed_gems would probably be cleaner and more forward-compatible - especially since I'm pretty sure there are bugs in this area. -- Chad -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeremy at hinegardner.org Thu Oct 9 17:33:58 2008 From: jeremy at hinegardner.org (Jeremy Hinegardner) Date: Thu, 9 Oct 2008 15:33:58 -0600 Subject: [Rubygems-developers] Gem methods? In-Reply-To: References: <0bcb3430-bd02-47d9-8642-5f636be303d6@n1g2000prb.googlegroups.com> <20081009171819.GV27162@hinegardner.org> Message-ID: <20081009213358.GB15733@hinegardner.org> On Thu, Oct 09, 2008 at 11:20:31AM -0700, Chad Woolley wrote: > On Thu, Oct 9, 2008 at 10:18 AM, Jeremy Hinegardner > wrote: > > > > > > In addition is there a way to access a gemspec from code? > > > > See the first 3 lines of the is_active? method above for a way to search > > for a gemspec. > > > > I think Gem::SourceIndex.from_installed_gems would probably be cleaner and > more forward-compatible - especially since I'm pretty sure there are bugs in > this area. Its the same line of code, I was avoiding from_installed_gems because of the *deprecated parameter, which at the moment I wrote the snippet I was thinking was meaning the method was deprecated instead of just the parameter. Snippet: Gem::SourceIndex.from_gems_in( *Gem::SourceIndex.installed_spec_directories ) Gem::SourceIndex.from_installed_gems: def from_installed_gems(*deprecated) if deprecated.empty? from_gems_in(*installed_spec_directories) else from_gems_in(*deprecated) # HACK warn end end So if the method is still around, but the usage with a parameter is deprecated then yes, using Gem::SourceIndex.from_installed_gems would be more forward compatible. enjoy, -jeremy -- ======================================================================== Jeremy Hinegardner jeremy at hinegardner.org From drbrain at segment7.net Thu Oct 9 19:18:50 2008 From: drbrain at segment7.net (Eric Hodel) Date: Thu, 9 Oct 2008 16:18:50 -0700 Subject: [Rubygems-developers] Gem methods? In-Reply-To: <0bcb3430-bd02-47d9-8642-5f636be303d6@n1g2000prb.googlegroups.com> References: <0bcb3430-bd02-47d9-8642-5f636be303d6@n1g2000prb.googlegroups.com> Message-ID: <510DF455-0AC8-443E-B452-9A88B0077C43@segment7.net> On Oct 9, 2008, at 08:29 AM, Trans wrote: > Is there a way to see if a gem is active (without activating it of > course)? Gem.loaded_specs is a Hash mapping gem names to gemspecs > In addition is there a way to access a gemspec from code? Gem.source_index has all available gems if you don't want active gems. > Lastly, is there a way to get the path to where a gem is installed? The gemspec has it, check ri. From jeremy at hinegardner.org Fri Oct 10 02:35:57 2008 From: jeremy at hinegardner.org (Jeremy Hinegardner) Date: Fri, 10 Oct 2008 00:35:57 -0600 Subject: [Rubygems-developers] [ANN] stickler 0.1.0 Message-ID: <20081010063557.GH15733@hinegardner.org> Hi all, I mentioned a week or so ago that I was working on project that did some of the things that 'gem mirror' does but with more fine grained configuration. I've just released the first version of stickler. * http://copiousfreetime.org/articles/2008/10/09/managing-a-gem-repository-with-stickler.html * http://copiousfreetime.rubyforge.org/stickler * http://github.com/copiousfreetime/stickler/tree/master It uses a fair bit of the Gem API, and I would appreciate feedback from anyone here on how to make it better. Feel free to be as harsh as you like. The quick description of Stickler: Stickler is a tool to organize and maintain an internal gem repository. At times it is useful to have complete control over the availability of the gems for you testing, staging and production environments. In these cases you probably do not want to accidentally type 'gem update' and get a new untested version of a gem installed on your machines. This is where Stickler helps. Configure stickler with the the names and versions of the gems you require for your deployment and it will organize and setup everything that is necessary for a standard web server to function as your internal gem distribution server. enjoy, -jeremy -- ======================================================================== Jeremy Hinegardner jeremy at hinegardner.org From transfire at gmail.com Fri Oct 10 21:27:38 2008 From: transfire at gmail.com (Trans) Date: Fri, 10 Oct 2008 18:27:38 -0700 (PDT) Subject: [Rubygems-developers] Gem methods? In-Reply-To: <510DF455-0AC8-443E-B452-9A88B0077C43@segment7.net> References: <0bcb3430-bd02-47d9-8642-5f636be303d6@n1g2000prb.googlegroups.com> <510DF455-0AC8-443E-B452-9A88B0077C43@segment7.net> Message-ID: <45592507-d7c0-4ac8-8f71-dbb70fc6d35a@64g2000hsm.googlegroups.com> On Oct 9, 7:18?pm, Eric Hodel wrote: > On Oct 9, 2008, at 08:29 AM, Trans wrote: > > > Is there a way to see if a gem is active (without activating it of > > course)? > > Gem.loaded_specs is a Hash mapping gem names to gemspecs Ok. That's what I expected with this one, but I wanted to make sure. Maybe something like Gem.loaded?(name, version) would be good feature for the future. > > In addition is there a way to access a gemspec from code? > > Gem.source_index has all available gems if you don't want active gems. Nice. That's helpful. > > Lastly, is there a way to get the path to where a gem is installed? > > The gemspec has it, check ri. Cool, thanks Eric. From quixoticsycophant at gmail.com Sun Oct 12 17:21:04 2008 From: quixoticsycophant at gmail.com (James M. Lawrence) Date: Sun, 12 Oct 2008 17:21:04 -0400 Subject: [Rubygems-developers] Build extensions with an .rb file [PATCH] Message-ID: <996afcbc0810121421y55885f2dmfb40284acbb1a745@mail.gmail.com> The following patch addresses some issues I encountered while creating the gem for a recent project. To summarize, my solution is to have a builder which recognizes .rb files, Gem::Specification.new { |s| # ... s.extensions << "build.rb" } This bypasses the need for rake or make, and the need to generate dummy Rakefiles or Makefiles. For reference, the project is http://github.com/quix/p4ruby/tree/master The install.rb downloads files, compiles, and installs. Passing --gem to install.rb runs it under gem configuration mode, which "installs" to ./ext and ./lib. The first question was which builder in lib/rubygems/ext I should use. My install.rb is not an extconf.rb, however an extconf.rb could be used as a front for install.rb. ConfigureBuilder and ExtConfBuilder would both require a dummy Makefile to be generated. However a Makefile consisting of just the line "all:\n" would look like a bug, plus the 'make' dependency would be unnecessary in the first place. This leaves RakeBuilder. The default task of my Rakefile runs "install.rb --gem". This is less than ideal for the following reasons, (a) The 'rake' dependency is unnecessary. In fact I had forgotten to add_dependency("rake") in the gemspec. (Shouldn't this be done automatically when spec.extensions << "Rakefile" is given?) (b) I had been using system() to invoke the ruby executable with "install.rb --gem" because I had run into rubygems' name pollution, http://rubyforge.org/tracker/index.php?func=detail&aid=20801&group_id=126&atid=575 I had then encountered another issue where joining CONFIG['bindir'] with CONFIG['ruby_install_name'] does not produce a runnable ruby on all platforms. Therefore I went back to load("install.rb") after making a change to accommodate the name pollution (crossing my fingers on other possible pollution). These problems are byproducts of rubygems not being able to call install.rb. (c) The Rakefile carries the baggage of tasks only used in development ('rake package', etc). Already gempackagetask.rb outputs a warning (for manage_gems). I could generate a minimal Rakefile just for the gem, but this seems too convoluted, like the near-empty Makefile. It would be better not to even need a Rakefile. In my patch, rubygems passes "--gem" to the .rb file given in gemspec.extensions. This would be a nice feature since it allows an install.rb to be used for both the normal install and the gem setup. Otherwise I'd have to make a separate gem.rb (which would just set ARGV and load install.rb anyway). In any case, the --gem option is not important compared to having RbBuilder in the first place. Index: lib/rubygems/ext/rb_builder.rb =================================================================== --- lib/rubygems/ext/rb_builder.rb (revision 0) +++ lib/rubygems/ext/rb_builder.rb (revision 0) @@ -0,0 +1,16 @@ + +require 'rubygems/ext/builder' + +class Gem::Ext::RbBuilder < Gem::Ext::Builder + + def self.build(extension, directory, dest_path, results) + cmd = "#{Gem.ruby} #{File.basename extension} --gem" + cmd << " #{ARGV.join ' '}" unless ARGV.empty? + + run cmd, results + + results + end + +end + Index: lib/rubygems/installer.rb =================================================================== --- lib/rubygems/installer.rb (revision 1904) +++ lib/rubygems/installer.rb (working copy) @@ -474,6 +474,8 @@ when /rakefile/i, /mkrf_conf/i then ran_rake = true Gem::Ext::RakeBuilder + when /\.rb\Z/ then + Gem::Ext::RbBuilder else results = ["No builder for extension '#{extension}'"] nil Index: lib/rubygems/ext.rb =================================================================== --- lib/rubygems/ext.rb (revision 1904) +++ lib/rubygems/ext.rb (working copy) @@ -15,4 +15,5 @@ require 'rubygems/ext/configure_builder' require 'rubygems/ext/ext_conf_builder' require 'rubygems/ext/rake_builder' +require 'rubygems/ext/rb_builder' From pratiknaik at gmail.com Sun Oct 19 17:05:23 2008 From: pratiknaik at gmail.com (Pratik) Date: Sun, 19 Oct 2008 22:05:23 +0100 Subject: [Rubygems-developers] Alternatives to deprecated Gem::cache.search Message-ID: <9212531d0810191405p6a8319e7p726033731bf52e60@mail.gmail.com> Hi all, Rails currently uses deprecated "Gem::cache.search(/_generator$/)" which is deprecated in rubygems 1.3.0. This causes a warning to be thrown everytime "script/generate" is called. Could someone please suggest an alternative that's backwards compatible ? I came up with this patch https://gist.github.com/99481e566e2a2d925651.txt after quickly going through rubygems source. But I'm not sure if that's the best way to go about it. Any help/suggestions are greatly appreciated! Thanks. -- Cheers! - Pratik http://m.onkey.org From drbrain at segment7.net Mon Oct 20 21:23:26 2008 From: drbrain at segment7.net (Eric Hodel) Date: Mon, 20 Oct 2008 18:23:26 -0700 Subject: [Rubygems-developers] Alternatives to deprecated Gem::cache.search In-Reply-To: <9212531d0810191405p6a8319e7p726033731bf52e60@mail.gmail.com> References: <9212531d0810191405p6a8319e7p726033731bf52e60@mail.gmail.com> Message-ID: <1ABCBE41-6962-41E9-88D9-F609A7F8B7F1@segment7.net> On Oct 19, 2008, at 14:05 PM, Pratik wrote: > Rails currently uses deprecated "Gem::cache.search(/_generator$/)" > which is deprecated in rubygems 1.3.0. This causes a warning to be > thrown everytime "script/generate" is called. Could someone please > suggest an alternative that's backwards compatible ? > > I came up with this patch > https://gist.github.com/99481e566e2a2d925651.txt after quickly going > through rubygems source. But I'm not sure if that's the best way to go > about it. > > Any help/suggestions are greatly appreciated! That is correct. From drbrain at segment7.net Mon Oct 20 21:37:40 2008 From: drbrain at segment7.net (Eric Hodel) Date: Mon, 20 Oct 2008 18:37:40 -0700 Subject: [Rubygems-developers] Please test for a 1.3.1 Message-ID: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> I will be including the current trunk on Thursday in Ruby for the upcoming 1.9.1. Shortly afterward I will release RubyGems 1.3.1. There are only a few bug fixes: Silencing the PATH warning for unpack Fixes for Gem.inflate, deflate, etc. Switched to MiniTest for 1.9 compatibility Gem.dir reads config file RubyGems 1.3.1 works on windows now From quixoticsycophant at gmail.com Mon Oct 20 23:25:56 2008 From: quixoticsycophant at gmail.com (James M. Lawrence) Date: Mon, 20 Oct 2008 23:25:56 -0400 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> Message-ID: <996afcbc0810202025j64bd58bcmdece6d36a63772e7@mail.gmail.com> On Mon, Oct 20, 2008 at 9:37 PM, Eric Hodel wrote: > I will be including the current trunk on Thursday in Ruby for the upcoming > 1.9.1. Shortly afterward I will release RubyGems 1.3.1. Would it be possible to apply this tiny patch to fix #20801 % ruby -r rubygems -e 'p "foo".require("socket")' true That's just bad. http://rubyforge.org/tracker/index.php?func=detail&aid=20801&group_id=126&atid=575 Index: lib/rubygems.rb =================================================================== --- lib/rubygems.rb (revision 1904) +++ lib/rubygems.rb (working copy) @@ -49,6 +49,7 @@ Gem.activate(gem_name, *version_requirements) end + private :gem end ## Index: lib/rubygems/custom_require.rb =================================================================== --- lib/rubygems/custom_require.rb (revision 1904) +++ lib/rubygems/custom_require.rb (working copy) @@ -34,5 +34,7 @@ raise load_error end end + + private :require, :gem_original_require end # module Kernel From Daniel.Berger at qwest.com Tue Oct 21 11:53:22 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Tue, 21 Oct 2008 10:53:22 -0500 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> Message-ID: <7524A45A1A5B264FA4809E2156496CFB04514DA0@ITOMAE2KM01.AD.QINTRA.COM> > -----Original Message----- > From: rubygems-developers-bounces at rubyforge.org > [mailto:rubygems-developers-bounces at rubyforge.org] On Behalf > Of Eric Hodel > Sent: Monday, October 20, 2008 7:38 PM > To: rubygems-developers at rubyforge.org > Subject: [Rubygems-developers] Please test for a 1.3.1 > > I will be including the current trunk on Thursday in Ruby for the > upcoming 1.9.1. Shortly afterward I will release RubyGems 1.3.1. > There are only a few bug fixes: > > Silencing the PATH warning for unpack > Fixes for Gem.inflate, deflate, etc. > Switched to MiniTest for 1.9 compatibility Gem.dir reads Are you making minitest a requirement even for 1.8.x? That's how it seems to be now: Ruby 1.8.6-p114 (VC++ 8) Windows XP Pro C:\Documents and Settings\djberge\workspace\rubygems>rake test (in C:/Documents and Settings/djberge/workspace/rubygems) C:0:Warning: Gem::manage_gems is deprecated and will be removed on or after March 2009. Install minitest gem ./lib/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- minitest/unit (LoadError) from ./lib/rubygems/custom_require.rb:27:in `require' from C:/Documents and Settings/djberge/workspace/rubygems/test/gemutilities.rb:14 from ./lib/rubygems/custom_require.rb:27:in `gem_original_require' from ./lib/rubygems/custom_require.rb:27:in `require' from ./test/test_config.rb:7 from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5 :in `load' from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5 from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5 :in `each' from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5 rake aborted! Command failed with status (1): [C:/ruby/bin/ruby -w -Ilib "C:/ruby/lib/rub...] The Warning line (and format) is strange, too. Regards, 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 luislavena at gmail.com Tue Oct 21 11:58:41 2008 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 21 Oct 2008 12:58:41 -0300 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: <7524A45A1A5B264FA4809E2156496CFB04514DA0@ITOMAE2KM01.AD.QINTRA.COM> References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> <7524A45A1A5B264FA4809E2156496CFB04514DA0@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <71166b3b0810210858v6897e721jb07b0498e78d967d@mail.gmail.com> On Tue, Oct 21, 2008 at 12:53 PM, Berger, Daniel wrote: > > -----Original Message----- >> From: rubygems-developers-bounces at rubyforge.org >> [mailto:rubygems-developers-bounces at rubyforge.org] On Behalf >> Of Eric Hodel >> Sent: Monday, October 20, 2008 7:38 PM >> To: rubygems-developers at rubyforge.org >> Subject: [Rubygems-developers] Please test for a 1.3.1 >> >> I will be including the current trunk on Thursday in Ruby for the >> upcoming 1.9.1. Shortly afterward I will release RubyGems 1.3.1. >> There are only a few bug fixes: >> >> Silencing the PATH warning for unpack >> Fixes for Gem.inflate, deflate, etc. >> Switched to MiniTest for 1.9 compatibility Gem.dir reads > > Are you making minitest a requirement even for 1.8.x? That's how it > seems to be now: > > Ruby 1.8.6-p114 (VC++ 8) > Windows XP Pro > Looks like, the same here. > C:\Documents and Settings\djberge\workspace\rubygems>rake test > (in C:/Documents and Settings/djberge/workspace/rubygems) > C:0:Warning: Gem::manage_gems is deprecated and will be removed on or > after March 2009. > Install minitest gem > ./lib/rubygems/custom_require.rb:27:in `gem_original_require': no such > file to load -- minitest/unit > (LoadError) > from ./lib/rubygems/custom_require.rb:27:in `require' > from C:/Documents and > Settings/djberge/workspace/rubygems/test/gemutilities.rb:14 > from ./lib/rubygems/custom_require.rb:27:in > `gem_original_require' > from ./lib/rubygems/custom_require.rb:27:in `require' > from ./test/test_config.rb:7 > from > C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5 > :in `load' > from > C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5 > from > C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5 > :in `each' > from > C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5 > rake aborted! > Command failed with status (1): [C:/ruby/bin/ruby -w -Ilib > "C:/ruby/lib/rub...] > > The Warning line (and format) is strange, too. > The warning line is because Rake is using manage_gems in the script which is being "required" by the rubygems stubs... latest version (0.8.3 I think) have that fixed -- but memory is not my strong point today. > Regards, > > Dan > BTW: all tests passes on MinGW, and all test pases on mswin32 (VC6). One thing I noticed is that when you install the gem in ~/.gem or any other place outside the gems of the distribution, it fails. I'll provide more info later today. -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From thewoolleyman at gmail.com Tue Oct 21 14:06:36 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Tue, 21 Oct 2008 11:06:36 -0700 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> Message-ID: On Mon, Oct 20, 2008 at 6:37 PM, Eric Hodel wrote: > I will be including the current trunk on Thursday in Ruby for the upcoming > 1.9.1. Shortly afterward I will release RubyGems 1.3.1. There are only a > few bug fixes: > I'm getting some functional test failures in the GemInstaller suite on OSX (not linux). I'll try to look into it tonight. One thing - I remember thinking that my spec helper/embedded server path hacks were no longer working to run against the embedded svn:external trunk of rubygems, and instead running against the installed version. I haven't had time to look into this, but it may be a separate bug, or it may mean the failures are red herrings. -- Chad -------------- next part -------------- An HTML attachment was scrubbed... URL: From drbrain at segment7.net Tue Oct 21 16:08:36 2008 From: drbrain at segment7.net (Eric Hodel) Date: Tue, 21 Oct 2008 13:08:36 -0700 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: <7524A45A1A5B264FA4809E2156496CFB04514DA0@ITOMAE2KM01.AD.QINTRA.COM> References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> <7524A45A1A5B264FA4809E2156496CFB04514DA0@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: On Oct 21, 2008, at 08:53 AM, Berger, Daniel wrote: >> -----Original Message----- >> From: rubygems-developers-bounces at rubyforge.org >> [mailto:rubygems-developers-bounces at rubyforge.org] On Behalf >> Of Eric Hodel >> Sent: Monday, October 20, 2008 7:38 PM >> To: rubygems-developers at rubyforge.org >> Subject: [Rubygems-developers] Please test for a 1.3.1 >> >> I will be including the current trunk on Thursday in Ruby for the >> upcoming 1.9.1. Shortly afterward I will release RubyGems 1.3.1. >> There are only a few bug fixes: >> >> Silencing the PATH warning for unpack >> Fixes for Gem.inflate, deflate, etc. >> Switched to MiniTest for 1.9 compatibility Gem.dir reads > > Are you making minitest a requirement even for 1.8.x? That's how it > seems to be now: Yes. > C:\Documents and Settings\djberge\workspace\rubygems>rake test > (in C:/Documents and Settings/djberge/workspace/rubygems) > C:0:Warning: Gem::manage_gems is deprecated and will be removed on or > after March 2009. > > The Warning line (and format) is strange, too. Gem::location_of_caller is insufficient for windows paths :/ From drbrain at segment7.net Tue Oct 21 16:10:21 2008 From: drbrain at segment7.net (Eric Hodel) Date: Tue, 21 Oct 2008 13:10:21 -0700 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: <996afcbc0810202025j64bd58bcmdece6d36a63772e7@mail.gmail.com> References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> <996afcbc0810202025j64bd58bcmdece6d36a63772e7@mail.gmail.com> Message-ID: <7A71F3F5-B5C8-4E9D-B794-A4555FB408D7@segment7.net> On Oct 20, 2008, at 20:25 PM, James M. Lawrence wrote: > On Mon, Oct 20, 2008 at 9:37 PM, Eric Hodel > wrote: >> I will be including the current trunk on Thursday in Ruby for the >> upcoming >> 1.9.1. Shortly afterward I will release RubyGems 1.3.1. > > Would it be possible to apply this tiny patch to fix #20801 > > % ruby -r rubygems -e 'p "foo".require("socket")' > true > > That's just bad. Sure. > http://rubyforge.org/tracker/index.php?func=detail&aid=20801&group_id=126&atid=575 > > Index: lib/rubygems.rb > =================================================================== > --- lib/rubygems.rb (revision 1904) > +++ lib/rubygems.rb (working copy) > @@ -49,6 +49,7 @@ > Gem.activate(gem_name, *version_requirements) > end > > + private :gem > end > > ## > Index: lib/rubygems/custom_require.rb > =================================================================== > --- lib/rubygems/custom_require.rb (revision 1904) > +++ lib/rubygems/custom_require.rb (working copy) > @@ -34,5 +34,7 @@ > raise load_error > end > end > + > + private :require, :gem_original_require > end # module Kernel > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers From Daniel.Berger at qwest.com Tue Oct 21 16:36:29 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Tue, 21 Oct 2008 15:36:29 -0500 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net><7524A45A1A5B264FA4809E2156496CFB04514DA0@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <7524A45A1A5B264FA4809E2156496CFB04514DA6@ITOMAE2KM01.AD.QINTRA.COM> Hi, > >> Silencing the PATH warning for unpack Fixes for > Gem.inflate, deflate, > >> etc. > >> Switched to MiniTest for 1.9 compatibility Gem.dir reads > > > > Are you making minitest a requirement even for 1.8.x? That's how it > > seems to be now: > > Yes. How will that work in practice if I do "gem update --system"? Will it go out and automatically grab minitest for me? Or is it pre-bundled somehow? Just curious. > > C:\Documents and Settings\djberge\workspace\rubygems>rake test (in > > C:/Documents and Settings/djberge/workspace/rubygems) > > C:0:Warning: Gem::manage_gems is deprecated and will be > removed on or > > after March 2009. > > > > The Warning line (and format) is strange, too. > > Gem::location_of_caller is insufficient for windows paths :/ How does this look? C:\>diff -u rubygems.orig rubygems.rb --- rubygems.orig Mon Sep 29 08:01:06 2008 +++ rubygems.rb Tue Oct 21 14:29:27 2008 @@ -479,8 +479,9 @@ # The file name and line number of the caller of the caller of this method. def self.location_of_caller - file, lineno = caller[1].split(':') - lineno = lineno.to_i + caller[1] =~ /(.*?)\:(\d+)$/i + file = $1 + lineno = $2.to_i [file, lineno] end Regards, 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 Daniel.Berger at qwest.com Tue Oct 21 16:43:52 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Tue, 21 Oct 2008 15:43:52 -0500 Subject: [Rubygems-developers] Readline relationship? Message-ID: <7524A45A1A5B264FA4809E2156496CFB04514DA8@ITOMAE2KM01.AD.QINTRA.COM> Hi, I'm currently running a version of Ruby without readline support (yep, Windows). When I run a "gem install" I get this: C:\>gem install win32-ipc Successfully installed win32-ipc-0.5.1 1 gem installed Installing ri documentation for win32-ipc-0.5.1... C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no to load -- readline (LoadError) from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/ruby/lib/ruby/gems/1.8/gems/rdoc-2.2.1/lib/rdoc/ri/display.rb:6 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/ruby/lib/ruby/gems/1.8/gems/rdoc-2.2.1/lib/rdoc/ri/driver.rb:7 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/doc_manager.rb:58:in `update_ri_cache from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:123: in `e from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/command.rb:136:in `invoke' from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:105:in `process_ar from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:75:in `run' from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:39:in `run' from C:/ruby/bin/gem:24 The gem appears to have installed successfully, so for now I've just been ignoring these errors. However, I'm curious about the relationship between rubygems and readline. What does rubygems need with readline exactly? And can it live without it? If it _can_ live without it, I think we should consider a more elegant way to deal with the LoadError. Regards, 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 luislavena at gmail.com Tue Oct 21 16:55:02 2008 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 21 Oct 2008 17:55:02 -0300 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> <7524A45A1A5B264FA4809E2156496CFB04514DA0@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <71166b3b0810211355he32d05ah9b7473dae90fdfc5@mail.gmail.com> On Tue, Oct 21, 2008 at 5:08 PM, Eric Hodel wrote: > On Oct 21, 2008, at 08:53 AM, Berger, Daniel wrote: >>> >>> -----Original Message----- >>> From: rubygems-developers-bounces at rubyforge.org >>> [mailto:rubygems-developers-bounces at rubyforge.org] On Behalf >>> Of Eric Hodel >>> Sent: Monday, October 20, 2008 7:38 PM >>> To: rubygems-developers at rubyforge.org >>> Subject: [Rubygems-developers] Please test for a 1.3.1 >>> >>> I will be including the current trunk on Thursday in Ruby for the >>> upcoming 1.9.1. Shortly afterward I will release RubyGems 1.3.1. >>> There are only a few bug fixes: >>> >>> Silencing the PATH warning for unpack >>> Fixes for Gem.inflate, deflate, etc. >>> Switched to MiniTest for 1.9 compatibility Gem.dir reads >> >> Are you making minitest a requirement even for 1.8.x? That's how it >> seems to be now: > > Yes. > >> C:\Documents and Settings\djberge\workspace\rubygems>rake test >> (in C:/Documents and Settings/djberge/workspace/rubygems) >> C:0:Warning: Gem::manage_gems is deprecated and will be removed on or >> after March 2009. >> >> The Warning line (and format) is strange, too. > > Gem::location_of_caller is insufficient for windows paths :/ We can fix that, but only with regexp, are you cool with that? -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From luislavena at gmail.com Tue Oct 21 16:57:53 2008 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 21 Oct 2008 17:57:53 -0300 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: <7524A45A1A5B264FA4809E2156496CFB04514DA6@ITOMAE2KM01.AD.QINTRA.COM> References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> <7524A45A1A5B264FA4809E2156496CFB04514DA0@ITOMAE2KM01.AD.QINTRA.COM> <7524A45A1A5B264FA4809E2156496CFB04514DA6@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <71166b3b0810211357g4b67764cyc3e0158fd73ea27f@mail.gmail.com> On Tue, Oct 21, 2008 at 5:36 PM, Berger, Daniel wrote: > Hi, > > > >> >> Silencing the PATH warning for unpack Fixes for >> Gem.inflate, deflate, >> >> etc. >> >> Switched to MiniTest for 1.9 compatibility Gem.dir reads >> > >> > Are you making minitest a requirement even for 1.8.x? That's how it >> > seems to be now: >> >> Yes. > > How will that work in practice if I do "gem update --system"? Will it go > out and automatically grab minitest for me? Or is it pre-bundled > somehow? Just curious. > Is a dev dependency, so it only affects you if you checkout rubygems source and perform "rake test" >> > C:\Documents and Settings\djberge\workspace\rubygems>rake test (in >> > C:/Documents and Settings/djberge/workspace/rubygems) >> > C:0:Warning: Gem::manage_gems is deprecated and will be >> removed on or >> > after March 2009. >> > >> > The Warning line (and format) is strange, too. >> >> Gem::location_of_caller is insufficient for windows paths :/ > > How does this look? > > C:\>diff -u rubygems.orig rubygems.rb > --- rubygems.orig Mon Sep 29 08:01:06 2008 > +++ rubygems.rb Tue Oct 21 14:29:27 2008 > @@ -479,8 +479,9 @@ > # The file name and line number of the caller of the caller of this > method. > > def self.location_of_caller > - file, lineno = caller[1].split(':') > - lineno = lineno.to_i > + caller[1] =~ /(.*?)\:(\d+)$/i > + file = $1 > + lineno = $2.to_i > [file, lineno] > end > > Regards, > Bummer, you beat me, hate bad internet wireless connections... I did something similar but one liner for Thor: http://github.com/luislavena/thor/commit/e66b67a684200ccd915d5808cb415ea6e5fe08c6 And of course, for the ones didn't noticed it, I suck at regexp :-P -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From luislavena at gmail.com Tue Oct 21 17:05:42 2008 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 21 Oct 2008 18:05:42 -0300 Subject: [Rubygems-developers] Readline relationship? In-Reply-To: <7524A45A1A5B264FA4809E2156496CFB04514DA8@ITOMAE2KM01.AD.QINTRA.COM> References: <7524A45A1A5B264FA4809E2156496CFB04514DA8@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <71166b3b0810211405v16a1a652i1e3bb663226c347e@mail.gmail.com> On Tue, Oct 21, 2008 at 5:43 PM, Berger, Daniel wrote: > Hi, > > I'm currently running a version of Ruby without readline support (yep, > Windows). When I run a "gem install" I get this: > Hmn.... > C:\>gem install win32-ipc > Successfully installed win32-ipc-0.5.1 > 1 gem installed > Installing ri documentation for win32-ipc-0.5.1... > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require': no > to load -- readline (LoadError) > from > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from > C:/ruby/lib/ruby/gems/1.8/gems/rdoc-2.2.1/lib/rdoc/ri/display.rb:6 > from > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original > from > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from > C:/ruby/lib/ruby/gems/1.8/gems/rdoc-2.2.1/lib/rdoc/ri/driver.rb:7 > from > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original > from > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/doc_manager.rb:58:in > `update_ri_cache > from > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:123: > in `e > from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/command.rb:136:in > `invoke' > from > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:105:in > `process_ar > from > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:75:in `run' > from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:39:in > `run' > from C:/ruby/bin/gem:24 > > The gem appears to have installed successfully, so for now I've just > been ignoring these errors. However, I'm curious about the relationship > between rubygems and readline. What does rubygems need with readline > exactly? And can it live without it? > > If it _can_ live without it, I think we should consider a more elegant > way to deal with the LoadError. > > Regards, > > Dan > Look awkward, since I didn't had readline early while bootstrapping the new one-click and it worked fine. I just did a grep through the sources and couldn't find a reference to require 'readline' directly, neither usage of Readline. Maybe something went south on that gem? -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From Daniel.Berger at qwest.com Tue Oct 21 17:07:31 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Tue, 21 Oct 2008 16:07:31 -0500 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: <71166b3b0810211357g4b67764cyc3e0158fd73ea27f@mail.gmail.com> References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net><7524A45A1A5B264FA4809E2156496CFB04514DA0@ITOMAE2KM01.AD.QINTRA.COM><7524A45A1A5B264FA4809E2156496CFB04514DA6@ITOMAE2KM01.AD.QINTRA.COM> <71166b3b0810211357g4b67764cyc3e0158fd73ea27f@mail.gmail.com> Message-ID: <7524A45A1A5B264FA4809E2156496CFB04514DAA@ITOMAE2KM01.AD.QINTRA.COM> Hi, > >> > >> Gem::location_of_caller is insufficient for windows paths :/ > > > > How does this look? > > > > C:\>diff -u rubygems.orig rubygems.rb > > --- rubygems.orig Mon Sep 29 08:01:06 2008 > > +++ rubygems.rb Tue Oct 21 14:29:27 2008 > > @@ -479,8 +479,9 @@ > > # The file name and line number of the caller of the > caller of this > > method. > > > > def self.location_of_caller > > - file, lineno = caller[1].split(':') > > - lineno = lineno.to_i > > + caller[1] =~ /(.*?)\:(\d+)$/i > > + file = $1 > > + lineno = $2.to_i > > [file, lineno] > > end > > > > Regards, > > > > Bummer, you beat me, hate bad internet wireless connections... > > I did something similar but one liner for Thor: > > http://github.com/luislavena/thor/commit/e66b67a684200ccd915d5 > 808cb415ea6e5fe08c6 > > And of course, for the ones didn't noticed it, I suck at regexp :-P Mine is more verbose but less greedy. This better? def self.location_of_caller caller[1] =~ /(.*?)\:(\d+)$/i [$1, $2.to_i] # file, lineno end Regards, 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 luislavena at gmail.com Tue Oct 21 17:09:33 2008 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 21 Oct 2008 18:09:33 -0300 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: <7524A45A1A5B264FA4809E2156496CFB04514DAA@ITOMAE2KM01.AD.QINTRA.COM> References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> <7524A45A1A5B264FA4809E2156496CFB04514DA0@ITOMAE2KM01.AD.QINTRA.COM> <7524A45A1A5B264FA4809E2156496CFB04514DA6@ITOMAE2KM01.AD.QINTRA.COM> <71166b3b0810211357g4b67764cyc3e0158fd73ea27f@mail.gmail.com> <7524A45A1A5B264FA4809E2156496CFB04514DAA@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <71166b3b0810211409m4856072r7db927834cce1494@mail.gmail.com> On Tue, Oct 21, 2008 at 6:07 PM, Berger, Daniel wrote: > Hi, > > > >> >> >> >> Gem::location_of_caller is insufficient for windows paths :/ >> > >> > How does this look? >> > >> > C:\>diff -u rubygems.orig rubygems.rb >> > --- rubygems.orig Mon Sep 29 08:01:06 2008 >> > +++ rubygems.rb Tue Oct 21 14:29:27 2008 >> > @@ -479,8 +479,9 @@ >> > # The file name and line number of the caller of the >> caller of this >> > method. >> > >> > def self.location_of_caller >> > - file, lineno = caller[1].split(':') >> > - lineno = lineno.to_i >> > + caller[1] =~ /(.*?)\:(\d+)$/i >> > + file = $1 >> > + lineno = $2.to_i >> > [file, lineno] >> > end >> > >> > Regards, >> > >> >> Bummer, you beat me, hate bad internet wireless connections... >> >> I did something similar but one liner for Thor: >> >> http://github.com/luislavena/thor/commit/e66b67a684200ccd915d5 >> 808cb415ea6e5fe08c6 >> >> And of course, for the ones didn't noticed it, I suck at regexp :-P > > Mine is more verbose but less greedy. This better? > > def self.location_of_caller > caller[1] =~ /(.*?)\:(\d+)$/i > [$1, $2.to_i] # file, lineno > end > > Regards, > > Dan > Bytes are cheap nowdays :-) I just was saying how lame my regexp skillz are :-P I like more the first one, was more clear the intention of it and I think Eric will agree, obscure code do not help you on the long run. -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From Daniel.Berger at qwest.com Tue Oct 21 17:14:56 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Tue, 21 Oct 2008 16:14:56 -0500 Subject: [Rubygems-developers] Readline relationship? In-Reply-To: <71166b3b0810211405v16a1a652i1e3bb663226c347e@mail.gmail.com> References: <7524A45A1A5B264FA4809E2156496CFB04514DA8@ITOMAE2KM01.AD.QINTRA.COM> <71166b3b0810211405v16a1a652i1e3bb663226c347e@mail.gmail.com> Message-ID: <7524A45A1A5B264FA4809E2156496CFB04514DAB@ITOMAE2KM01.AD.QINTRA.COM> Hi, > Look awkward, since I didn't had readline early while > bootstrapping the new one-click and it worked fine. I just > did a grep through the sources and couldn't find a reference > to require 'readline' directly, neither usage of Readline. > > Maybe something went south on that gem? Oh, silly me, I didn't look close enough. That's coming from rdoc, not rubygems. I'll take a look at that separately. Nevermind. Regards, 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 Daniel.Berger at qwest.com Tue Oct 21 17:24:44 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Tue, 21 Oct 2008 16:24:44 -0500 Subject: [Rubygems-developers] Readline relationship? In-Reply-To: <7524A45A1A5B264FA4809E2156496CFB04514DAB@ITOMAE2KM01.AD.QINTRA.COM> References: <7524A45A1A5B264FA4809E2156496CFB04514DA8@ITOMAE2KM01.AD.QINTRA.COM><71166b3b0810211405v16a1a652i1e3bb663226c347e@mail.gmail.com> <7524A45A1A5B264FA4809E2156496CFB04514DAB@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <7524A45A1A5B264FA4809E2156496CFB04514DAC@ITOMAE2KM01.AD.QINTRA.COM> > -----Original Message----- > From: rubygems-developers-bounces at rubyforge.org > [mailto:rubygems-developers-bounces at rubyforge.org] On Behalf > Of Berger, Daniel > Sent: Tuesday, October 21, 2008 3:15 PM > To: rubygems-developers at rubyforge.org > Subject: Re: [Rubygems-developers] Readline relationship? > > Hi, > > > > > Look awkward, since I didn't had readline early while bootstrapping > > the new one-click and it worked fine. I just did a grep through the > > sources and couldn't find a reference to require 'readline' > directly, > > neither usage of Readline. > > > > Maybe something went south on that gem? > > Oh, silly me, I didn't look close enough. That's coming from > rdoc, not rubygems. I'll take a look at that separately. > > Nevermind. Patch here if anyone's interested: http://rubyforge.org/tracker/index.php?func=detail&aid=22500&group_id=62 7&atid=2472 Regards, 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 drbrain at segment7.net Wed Oct 22 01:39:01 2008 From: drbrain at segment7.net (Eric Hodel) Date: Tue, 21 Oct 2008 22:39:01 -0700 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: <7524A45A1A5B264FA4809E2156496CFB04514DA6@ITOMAE2KM01.AD.QINTRA.COM> References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net><7524A45A1A5B264FA4809E2156496CFB04514DA0@ITOMAE2KM01.AD.QINTRA.COM> <7524A45A1A5B264FA4809E2156496CFB04514DA6@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <03C16269-D04B-4EEF-8FAB-B0900BE47A64@segment7.net> On Oct 21, 2008, at 13:36 PM, Berger, Daniel wrote: >>> Are you making minitest a requirement even for 1.8.x? That's how it >>> seems to be now: >> >> Yes. > > How will that work in practice if I do "gem update --system"? Will > it go > out and automatically grab minitest for me? Or is it pre-bundled > somehow? Just curious. It is only a requirement for people running RubyGems' tests, which don't run when updating RubyGems (it would be nice to run them, but then people would freak out like the world was on fire when they fail). On installation of a new RubyGems nothing will happen that didn't happen before. >>> C:\Documents and Settings\djberge\workspace\rubygems>rake test (in >>> C:/Documents and Settings/djberge/workspace/rubygems) >>> C:0:Warning: Gem::manage_gems is deprecated and will be >> removed on or >>> after March 2009. >>> >>> The Warning line (and format) is strange, too. >> >> Gem::location_of_caller is insufficient for windows paths :/ > > How does this look? > > C:\>diff -u rubygems.orig rubygems.rb > --- rubygems.orig Mon Sep 29 08:01:06 2008 > +++ rubygems.rb Tue Oct 21 14:29:27 2008 > @@ -479,8 +479,9 @@ > # The file name and line number of the caller of the caller of this > method. > > def self.location_of_caller > - file, lineno = caller[1].split(':') > - lineno = lineno.to_i > + caller[1] =~ /(.*?)\:(\d+)$/i > + file = $1 > + lineno = $2.to_i > [file, lineno] > end Looks good, I will use it. From drbrain at segment7.net Wed Oct 22 01:40:33 2008 From: drbrain at segment7.net (Eric Hodel) Date: Tue, 21 Oct 2008 22:40:33 -0700 Subject: [Rubygems-developers] Readline relationship? In-Reply-To: <7524A45A1A5B264FA4809E2156496CFB04514DAC@ITOMAE2KM01.AD.QINTRA.COM> References: <7524A45A1A5B264FA4809E2156496CFB04514DA8@ITOMAE2KM01.AD.QINTRA.COM><71166b3b0810211405v16a1a652i1e3bb663226c347e@mail.gmail.com> <7524A45A1A5B264FA4809E2156496CFB04514DAB@ITOMAE2KM01.AD.QINTRA.COM> <7524A45A1A5B264FA4809E2156496CFB04514DAC@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: On Oct 21, 2008, at 14:24 PM, Berger, Daniel wrote: >>> Look awkward, since I didn't had readline early while bootstrapping >>> the new one-click and it worked fine. I just did a grep through the >>> sources and couldn't find a reference to require 'readline' >> directly, >>> neither usage of Readline. >>> >>> Maybe something went south on that gem? >> >> Oh, silly me, I didn't look close enough. That's coming from >> rdoc, not rubygems. I'll take a look at that separately. >> >> Nevermind. > > Patch here if anyone's interested: Yup, but I beat you to it by about a week. From thewoolleyman at gmail.com Wed Oct 22 17:02:11 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Wed, 22 Oct 2008 14:02:11 -0700 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> Message-ID: On Tue, Oct 21, 2008 at 11:06 AM, Chad Woolley wrote: > I'm getting some functional test failures in the GemInstaller suite on OSX > (not linux). I'll try to look into it tonight. > These test failures go away if I comment out my ~/.gemrc, where I've overridden gemhome and gempath to only point to ~/.gem, and possibly only on Leopard. It seems to be ignoring my config file override. This is a bug, but one that probably already exists in 1.3.0, or in any case won't affect many people. > One thing - I remember thinking that my spec helper/embedded server path > hacks were no longer working to run against the embedded svn:external trunk > of rubygems, and instead running against the installed version. I haven't > had time to look into this, but it may be a separate bug, or it may mean the > failures are red herrings. > Couldn't reproduce this. Still a pain in the butt to manually edit the version file in my svn:external to be > 1.3.0, but that's another topic. Can we bump to 1.3.1.1 right after we release? :) Anyway, I think trunk looks good to release from my view. -- Chad -------------- next part -------------- An HTML attachment was scrubbed... URL: From thewoolleyman at gmail.com Thu Oct 23 14:42:38 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Thu, 23 Oct 2008 11:42:38 -0700 Subject: [Rubygems-developers] Pessimistic version constraints not working? Message-ID: I'm confused. I read these: http://www.rubygems.org/read/chapter/16#page74 http://blog.zenspider.com/2008/10/rubygems-howto-preventing-cata.html But when I try this on the command line, I still always get all local gems with this name returned. Am I using it wrong, or what? $ gem list rails rails (2.1.1, 2.1.0, 2.0.2, 1.99.0, 1.2.6, 1.2.3) $ gem list rails --version '~>2.0.0' rails (2.1.1, 2.1.0, 2.0.2, 1.99.0, 1.2.6, 1.2.3) $ gem list rails --version '~>1.0' rails (2.1.1, 2.1.0, 2.0.2, 1.99.0, 1.2.6, 1.2.3) -------------- next part -------------- An HTML attachment was scrubbed... URL: From luislavena at gmail.com Thu Oct 23 15:18:06 2008 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 23 Oct 2008 16:18:06 -0300 Subject: [Rubygems-developers] Pessimistic version constraints not working? In-Reply-To: References: Message-ID: <71166b3b0810231218k4ed82f07qe40d90c2b9d22547@mail.gmail.com> On Thu, Oct 23, 2008 at 3:42 PM, Chad Woolley wrote: > I'm confused. I read these: > > http://www.rubygems.org/read/chapter/16#page74 > http://blog.zenspider.com/2008/10/rubygems-howto-preventing-cata.html > > But when I try this on the command line, I still always get all local gems > with this name returned. Am I using it wrong, or what? > > $ gem list rails > rails (2.1.1, 2.1.0, 2.0.2, 1.99.0, 1.2.6, 1.2.3) > > $ gem list rails --version '~>2.0.0' > rails (2.1.1, 2.1.0, 2.0.2, 1.99.0, 1.2.6, 1.2.3) > > $ gem list rails --version '~>1.0' > rails (2.1.1, 2.1.0, 2.0.2, 1.99.0, 1.2.6, 1.2.3) > > I couldn't get it working from the command line, but it works perfectly using gem method. Luis at KEORE (D:\Users\Luis\projects\area17\a17_redux\a17_redux.git) $ gem list rails *** LOCAL GEMS *** rails (2.1.1, 2.0.5, 1.2.6) Luis at KEORE (D:\Users\Luis\projects\area17\a17_redux\a17_redux.git) $ irb irb(main):001:0> require 'rubygems' => true irb(main):002:0> gem "rails", "~> 2.0.0" => true irb(main):003:0> pp $LOAD_PATH ["D:/Users/Luis/ruby/ruby-186-p114-MINGW-rubygems-130/lib/ruby/gems/1.8/gems/rake-0.8.3/bin", "D:/Users/Luis/ruby/ruby-186-p114-MINGW-rubygems-130/lib/ruby/gems/1.8/gems/rake-0.8.3/lib", "D:/Users/Luis/ruby/ruby-186-p114-MINGW-rubygems-130/lib/ruby/gems/1.8/gems/activesupport-2.0.5/bin", "D:/Users/Luis/ruby/ruby-186-p114-MINGW-rubygems-130/lib/ruby/gems/1.8/gems/activesupport-2.0.5/lib" ... ] -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From jim.weirich at gmail.com Thu Oct 23 15:53:27 2008 From: jim.weirich at gmail.com (Jim Weirich) Date: Thu, 23 Oct 2008 15:53:27 -0400 Subject: [Rubygems-developers] Pessimistic version constraints not working? In-Reply-To: <71166b3b0810231218k4ed82f07qe40d90c2b9d22547@mail.gmail.com> References: <71166b3b0810231218k4ed82f07qe40d90c2b9d22547@mail.gmail.com> Message-ID: <44A4E84A-649F-4BAB-A4B3-F41EBA80C6F5@gmail.com> On Oct 23, 2008, at 3:18 PM, Luis Lavena wrote: > I couldn't get it working from the command line, but it works > perfectly using gem method. I don't think it was intended to be used at the command line. But perhaps that is something that should be changed. -- -- Jim Weirich -- jim.weirich at gmail.com From thewoolleyman at gmail.com Thu Oct 23 17:14:15 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Thu, 23 Oct 2008 14:14:15 -0700 Subject: [Rubygems-developers] Pessimistic version constraints not working? In-Reply-To: <71166b3b0810231218k4ed82f07qe40d90c2b9d22547@mail.gmail.com> References: <71166b3b0810231218k4ed82f07qe40d90c2b9d22547@mail.gmail.com> Message-ID: On Thu, Oct 23, 2008 at 12:18 PM, Luis Lavena wrote: > > I couldn't get it working from the command line, but it works > perfectly using gem method. > Hmm, I tried from the API and it still didn't work. It may have been using the "list" command via the API rather than "gem", though. Busy now, but I'll look into it later... -------------- next part -------------- An HTML attachment was scrubbed... URL: From thewoolleyman at gmail.com Fri Oct 24 01:53:52 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Thu, 23 Oct 2008 22:53:52 -0700 Subject: [Rubygems-developers] Pessimistic version constraints not working? In-Reply-To: References: <71166b3b0810231218k4ed82f07qe40d90c2b9d22547@mail.gmail.com> Message-ID: On Thu, Oct 23, 2008 at 2:14 PM, Chad Woolley wrote: > On Thu, Oct 23, 2008 at 12:18 PM, Luis Lavena wrote: > >> >> I couldn't get it working from the command line, but it works >> perfectly using gem method. >> > > Hmm, I tried from the API and it still didn't work. It may have been using > the "list" command via the API rather than "gem", though. Busy now, but > I'll look into it later... > > Yeah, it works for the 'install' command, but not for 'list': >> require 'rubygems/gem_runner';Gem::GemRunner.new.run(['install', 'activesupport','--version','>2.0.0']) Successfully installed activesupport-2.1.2 1 gem installed >> require 'rubygems/gem_runner';Gem::GemRunner.new.run(['install', 'activesupport','--version','~>2.0.0']) Successfully installed activesupport-2.0.5 1 gem installed >> require 'rubygems/gem_runner';Gem::GemRunner.new.run(['list', 'activesupport','--version','~>2.0.0']) *** LOCAL GEMS *** activesupport (2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.2, 1.99.0, 1.4.4, 1.4.2) => nil -------------- next part -------------- An HTML attachment was scrubbed... URL: From drbrain at segment7.net Sat Oct 25 17:37:36 2008 From: drbrain at segment7.net (Eric Hodel) Date: Sat, 25 Oct 2008 14:37:36 -0700 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> Message-ID: <4FB7F7EA-E0F7-49E3-BB5A-82B9D08073F0@segment7.net> On Oct 22, 2008, at 14:02 PM, Chad Woolley wrote: > On Tue, Oct 21, 2008 at 11:06 AM, Chad Woolley > wrote: >> I'm getting some functional test failures in the GemInstaller suite >> on OSX (not linux). I'll try to look into it tonight. > > These test failures go away if I comment out my ~/.gemrc, where I've > overridden gemhome and gempath to only point to ~/.gem, and possibly > only on Leopard. It seems to be ignoring my config file override. > This is a bug, but one that probably already exists in 1.3.0, or in > any case won't affect many people. I may have to remove the :gemhome: and :gempath: in ~/.gemrc, since it is very difficult to reproduce the functionality in gem_prelude.rb for 1.9. From thewoolleyman at gmail.com Sat Oct 25 23:17:36 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Sat, 25 Oct 2008 20:17:36 -0700 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: <4FB7F7EA-E0F7-49E3-BB5A-82B9D08073F0@segment7.net> References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> <4FB7F7EA-E0F7-49E3-BB5A-82B9D08073F0@segment7.net> Message-ID: On Sat, Oct 25, 2008 at 2:37 PM, Eric Hodel wrote: > I may have to remove the :gemhome: and :gempath: in ~/.gemrc, since it is > very difficult to reproduce the functionality in gem_prelude.rb for 1.9. > Then will there be any way to configure all gems to be installed and loaded from ~/.gem, without any root access required (as long as ~/.gem/.../bin is on path)? -------------- next part -------------- An HTML attachment was scrubbed... URL: From drbrain at segment7.net Mon Oct 27 01:14:23 2008 From: drbrain at segment7.net (Eric Hodel) Date: Sun, 26 Oct 2008 22:14:23 -0700 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> <4FB7F7EA-E0F7-49E3-BB5A-82B9D08073F0@segment7.net> Message-ID: <31AB2ED5-2560-41E2-BDFF-2496605B915F@segment7.net> On Oct 25, 2008, at 20:17 PM, Chad Woolley wrote: > On Sat, Oct 25, 2008 at 2:37 PM, Eric Hodel > wrote: >> I may have to remove the :gemhome: and :gempath: in ~/.gemrc, since >> it is very difficult to reproduce the functionality in >> gem_prelude.rb for 1.9. > > Then will there be any way to configure all gems to be installed and > loaded from ~/.gem, without any root access required (as long as > ~/.gem/.../bin is on path)? GEM_PATH and GEM_HOME From thewoolleyman at gmail.com Mon Oct 27 15:22:07 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Mon, 27 Oct 2008 12:22:07 -0700 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: <31AB2ED5-2560-41E2-BDFF-2496605B915F@segment7.net> References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> <4FB7F7EA-E0F7-49E3-BB5A-82B9D08073F0@segment7.net> <31AB2ED5-2560-41E2-BDFF-2496605B915F@segment7.net> Message-ID: On Sun, Oct 26, 2008 at 10:14 PM, Eric Hodel wrote: > On Oct 25, 2008, at 20:17 PM, Chad Woolley wrote: > >> Then will there be any way to configure all gems to be installed and >> loaded from ~/.gem, without any root access required (as long as >> ~/.gem/.../bin is on path)? >> > > GEM_PATH and GEM_HOME > OK. So essentially, if an tool which uses the RubyGems API wants to make gem installation transparent and non-root, it will need to set these ENV variables before invoking any API call? And, I assume, manually send the "hey you need ~/.gem/.../bin on your path" message? I guess that will work - but I'm still curious to know why this would be difficult gem_prelude.rb for 1.9. Do you have links to any threads/IRC where this was discussed? -- Chad -------------- next part -------------- An HTML attachment was scrubbed... URL: From drbrain at segment7.net Wed Oct 29 16:34:36 2008 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 29 Oct 2008 13:34:36 -0700 Subject: [Rubygems-developers] [ANN] RubyGems 1.3.1 Message-ID: = Announce: RubyGems Release 1.3.1 NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to follow the second set of update instructions if you see "Nothing to update". Release 1.3.1 fixes some bugs. Bugs fixed: * Disregard ownership of ~ under Windows while creating ~/.gem. Fixes issues related to no uid support under Windows. * Fix requires for Gem::inflate, Gem::deflate, etc. * Make Gem.dir respect :gemhome value from config. (Note: this feature may be removed since it is hard to implement on 1.9.) * Kernel methods are now private. Patch #20801 by Stefan Rusterholz. * Gem::location_of_caller now behaves on Windows. Patch by Daniel Berger. * Silence PATH warning. Deprecation Notices: * Gem::manage_gems will be removed on or after March 2009. For a full list of changes to RubyGems and the contributor for each change, see the ChangeLog file. Special thanks to Chad Wooley for backwards compatibility testing and Luis Lavena for continuing windows support. == How can I get RubyGems? NOTE: If you have installed RubyGems using a package system you may want to install a new RubyGems through the same packaging system. If you have a recent version of RubyGems (0.8.5 or later), then all you need to do is: $ gem update --system (you might need to be admin/root) NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to follow the second set of update instructions if you see "Nothing to update". NOTE: You may have to run the command twice if you have any previosly installed rubygems-update gems. If you have an older version of RubyGems installed, then you can still do it in two steps: $ gem install rubygems-update (again, might need to be admin/root) $ update_rubygems (... here too) If you don't have any gems install, there is still the pre-gem approach to getting software ... doing it manually: 1. DOWNLOAD FROM: http://rubyforge.org/frs/?group_id=126 2. UNPACK INTO A DIRECTORY AND CD THERE 3. INSTALL WITH: ruby setup.rb (you may need admin/root privilege) == To File Bugs The RubyGems bug tracker can be found on RubyForge at: http://rubyforge.org/tracker/?func=add&group_id=126&atid=575 When filing a bug, `gem env` output will be helpful in diagnosing the issue. If you find a bug where RubyGems crashes, please provide debug output. You can do that with `gem --debug the_command`. == Thanks Keep those gems coming! -- Jim & Chad & Eric (for the RubyGems team) From Daniel.Berger at qwest.com Wed Oct 29 17:24:46 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Wed, 29 Oct 2008 16:24:46 -0500 Subject: [Rubygems-developers] Question on class cache updates Message-ID: <7524A45A1A5B264FA4809E2156496CFB04514DF4@ITOMAE2KM01.AD.QINTRA.COM> Hi, I have a quick question on class cache updates. It seems to be updating the class cache even if I don't specify -u on the command line. Is that expected behavior? RubyGems Environment: - RUBYGEMS VERSION: 1.3.1 - RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [i386-mswin32_80] - INSTALLATION DIRECTORY: C:/ruby/lib/ruby/gems/1.8 - RUBY EXECUTABLE: C:/ruby/bin/ruby.exe - EXECUTABLE DIRECTORY: C:/ruby/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-80 - GEM PATHS: - C:/ruby/lib/ruby/gems/1.8 - C:/Documents and Settings/djberge/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://gems.rubyforge.org/ C:\>gem install foobar ERROR: could not find gem foobar locally or in a repository Updating class cache with 1730 classes... Seems odd to me, but if that's expected, then I'll just be quiet. However, it also seems to do it when I tell it not to: C:\>gem install win32-dir --no-update-sources Successfully installed win32-dir-0.3.2 1 gem installed Installing ri documentation for win32-dir-0.3.2... Updating class cache with 1730 classes... Installing RDoc documentation for win32-dir-0.3.2... That, or I'm confused about -u, which is a definite possibility. Regards, 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 djberg96 at gmail.com Wed Oct 29 18:23:15 2008 From: djberg96 at gmail.com (Daniel Berger) Date: Wed, 29 Oct 2008 15:23:15 -0700 (PDT) Subject: [Rubygems-developers] Could not find RubyGem - because it's not a gem In-Reply-To: <802e14e9-39e7-4ad5-b25a-e6fe476e2e81@l42g2000hsc.googlegroups.com> References: <802e14e9-39e7-4ad5-b25a-e6fe476e2e81@l42g2000hsc.googlegroups.com> Message-ID: <23ccb135-34dc-4737-a97b-fc9a683f12b1@f77g2000hsf.googlegroups.com> On Oct 15, 3:49?pm, Daniel Berger wrote: > Hi all, > > Sorry, a bit of a cross-post here,becauseI'mnotsure if this is a > Rails issue or a gems issue. The problem is that I've got sys-admin > installed, justnotas agem, and that's causing a problem. > > First, some config info: > > RubyGems Environment: > ? - RUBYGEMS VERSION: 1.3.0 > ? - RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [i386-mswin32_80] > ? - INSTALLATION DIRECTORY: C:/ruby/lib/ruby/gems/1.8 > ? - RUBY EXECUTABLE: C:/ruby/bin/ruby.exe > ? - EXECUTABLE DIRECTORY: C:/ruby/bin > ? - RUBYGEMS PLATFORMS: > ? ? - ruby > ? ? - x86-mswin32-80 > ? -GEMPATHS: > ? ? ?- C:/ruby/lib/ruby/gems/1.8 > ? ? ?- C:/Documents and Settings/djberge/.gem/ruby/1.8 > ? -GEMCONFIGURATION: > ? ? ?- :update_sources => true > ? ? ?- :verbose => true > ? ? ?- :benchmark => false > ? ? ?- :backtrace => false > ? ? ?- :bulk_threshold => 1000 > ? - REMOTE SOURCES: > ? ? ?-http://gems.rubyforge.org/ > > irb(main):001:0> require 'sys/admin' > => true > > However, if I try to fire up Rails I get this: > > C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:628:in > `report_activate_error': Couldnotfind RubyGem sys-admin (>= 0) > (Gem::LoadError) > ? ? ? ? from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:139:in > `activate' > ? ? ? ? from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:163:in > `activate' > ? ? ? ? from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:162:in `each' > ? ? ? ? from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:162:in > `activate' > ? ? ? ? from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > 31:in `require' > ? ? ? ? from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/dependencies.rb:510:in `require' > ? ? ? ? from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/dependencies.rb:355:in `new_constants_in' > ? ? ? ? from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/dependencies.rb:510:in `require' > ? ? ? ? ?... 12 levels... > ? ? ? ? from C:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/commands/ > server.rb:39 > ? ? ? ? from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > 27:in `gem_original_require' > ? ? ? ? from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > 27:in `require' > ? ? ? ? from script/server:3 > > What's happening here? Problem with my setup or environment? Or a > problem with Rails? Ok, I think I've narrow this down a bit. The background to this is that I've installed the library called "win32-file" via rubygems. That library has a dependency on win32-file-stat, which in turn has a dependency on windows-pr, which in turn has a dependency on windows- api which in turn has a dependency on win32-api. You with me so far? It's the win32-api gem (or lack thereof) that's ultimately causing the issue. You see, I'm using a custom built Ruby using VC++ 8.0, so I had to uninstall win32-api (because the current binary gem I have out there is incompatible with my runtime), so that rubygems defaults to the win32-api I've built by hand and installed in Ruby's sitelibdir. At least that's what I thought it would do. And here's where it seems to get confused. Because one of the dependencies itself has a dependency on win32-api, but I've removed the win32-api gem, it dies instead of resorting to gem_original_require as a last ditch effort. I _think_ this can be resolved by rescuing Gem::LoadError in custom_require.rb, but I'm still deciding how to proceed. If anyone has any suggestion in the meantime, I'm all ears. Regards, Dan From drbrain at segment7.net Wed Oct 29 20:13:45 2008 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 29 Oct 2008 17:13:45 -0700 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> <4FB7F7EA-E0F7-49E3-BB5A-82B9D08073F0@segment7.net> <31AB2ED5-2560-41E2-BDFF-2496605B915F@segment7.net> Message-ID: <8BD9A53F-3F74-45B0-9A90-43A07A39500F@segment7.net> On Oct 27, 2008, at 12:22 PM, Chad Woolley wrote: > On Sun, Oct 26, 2008 at 10:14 PM, Eric Hodel > wrote: >> On Oct 25, 2008, at 20:17 PM, Chad Woolley wrote: >>> Then will there be any way to configure all gems to be installed >>> and loaded from ~/.gem, without any root access required (as long >>> as ~/.gem/.../bin is on path)? >> >> GEM_PATH and GEM_HOME > > OK. So essentially, if an tool which uses the RubyGems API wants to > make gem installation transparent and non-root, it will need to set > these ENV variables before invoking any API call? And, I assume, > manually send the "hey you need ~/.gem/.../bin on your path" message? If you're using the API to install gems, you get the benefit of the :install_dir option, so there's no need to set any environment variables. If you're writing a script that drives bin/gem, you can either set an environment variable or specify a path with --install-dir. The installer will take care of the warning message for you regardless. The API in general needs to be improved, as it is difficult to do what you want (whatever that may be). IIRC the methods you need to call to set the path are private, and I've left them private because I barely understand how they fit together. > I guess that will work - but I'm still curious to know why this > would be difficult gem_prelude.rb for 1.9. Do you have links to any > threads/IRC where this was discussed? gem_prelude.rb (and prelude.rb) aren't supposed to do much, and that includes opening and parsing files, even with a naive yaml parser. It's more of a political problem than a technical problem. From djberg96 at gmail.com Wed Oct 29 22:47:40 2008 From: djberg96 at gmail.com (Daniel Berger) Date: Wed, 29 Oct 2008 20:47:40 -0600 Subject: [Rubygems-developers] Could not find RubyGem - because it's not a gem In-Reply-To: <23ccb135-34dc-4737-a97b-fc9a683f12b1@f77g2000hsf.googlegroups.com> References: <802e14e9-39e7-4ad5-b25a-e6fe476e2e81@l42g2000hsc.googlegroups.com> <23ccb135-34dc-4737-a97b-fc9a683f12b1@f77g2000hsf.googlegroups.com> Message-ID: <4909204C.6080400@gmail.com> Daniel Berger wrote: > Ok, I think I've narrow this down a bit. The background to this is > that I've installed the library called "win32-file" via rubygems. That > library has a dependency on win32-file-stat, which in turn has a > dependency on windows-pr, which in turn has a dependency on windows- > api which in turn has a dependency on win32-api. > > You with me so far? It's the win32-api gem (or lack thereof) that's > ultimately causing the issue. > > You see, I'm using a custom built Ruby using VC++ 8.0, so I had to > uninstall win32-api (because the current binary gem I have out there > is incompatible with my runtime), so that rubygems defaults to the > win32-api I've built by hand and installed in Ruby's sitelibdir. At > least that's what I thought it would do. > > And here's where it seems to get confused. Because one of the > dependencies itself has a dependency on win32-api, but I've removed > the win32-api gem, it dies instead of resorting to > gem_original_require as a last ditch effort. > > I _think_ this can be resolved by rescuing Gem::LoadError in > custom_require.rb, but I'm still deciding how to proceed. > > If anyone has any suggestion in the meantime, I'm all ears. On second thought, this is a contract violation. I mean, if I say I want "some_lib >= 0.2.0", but there's no gem and the version in sitelibdir is only 0.1.0, that could be trouble. Another option would be a second, optional argument to the redefined Kernel#require in custom_require.rb so that the method looks like: def require(path, desparate=false) ... if desperate # Make a last ditch effort to find the lib in the standard libary end ... end With the understanding that if 'desperate' is true, you're potentially violating the gem versioning contract. Thoughts? Regards, Dan From thewoolleyman at gmail.com Thu Oct 30 02:36:19 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Wed, 29 Oct 2008 23:36:19 -0700 Subject: [Rubygems-developers] Please test for a 1.3.1 In-Reply-To: <8BD9A53F-3F74-45B0-9A90-43A07A39500F@segment7.net> References: <33C9AA5A-C73E-4C59-87E8-018BEC42520F@segment7.net> <4FB7F7EA-E0F7-49E3-BB5A-82B9D08073F0@segment7.net> <31AB2ED5-2560-41E2-BDFF-2496605B915F@segment7.net> <8BD9A53F-3F74-45B0-9A90-43A07A39500F@segment7.net> Message-ID: On Wed, Oct 29, 2008 at 5:13 PM, Eric Hodel wrote: > If you're using the API to install gems, you get the benefit of the > :install_dir option, so there's no need to set any environment variables. > If you're writing a script that drives bin/gem, you can either set an > environment variable or specify a path with --install-dir. > Right, but this means that any app or script that wants to use gems from this custom location must set the proper environment variables for gem home and path. This is more difficult and system-dependent than simply having the proper values in a cross-platform ~/.gemrc, which will be used whenever rubygems is invoked. > gem_prelude.rb (and prelude.rb) aren't supposed to do much, and that > includes opening and parsing files, even with a naive yaml parser. It's > more of a political problem than a technical problem. > Well, hopefully all the political problems will go away after the election... Thanks for the response. -- Chad -------------- next part -------------- An HTML attachment was scrubbed... URL: From pbrannan at atdesk.com Thu Oct 30 14:16:59 2008 From: pbrannan at atdesk.com (Paul Brannan) Date: Thu, 30 Oct 2008 14:16:59 -0400 Subject: [Rubygems-developers] testing (please ignore) Message-ID: <20081030181658.GD28667@atdesk.com> Couldn't send to the list yesterday, trying to fix postfix on my end...