From mikhailian at altern.org Sat Nov 4 06:03:24 2006 From: mikhailian at altern.org (Alexander Mikhailian) Date: Sat, 04 Nov 2006 12:03:24 +0100 Subject: [Rubygems-developers] gems 0.9.0 on ruby 1.8.2 +ubuntu 6.10 : now way to install to $HOME Message-ID: Here is I problem I have on a fresh Ubuntu install with the ruby-1.8.2-1 package. After downloading rubygems-0.9.0, I run $ ruby setup.rb all --prefix=/home/lowry which replies with hook /home/lowry/hobby/rubygems-0.9.0/./post-install.rb failed: You don't have write permissions into the /usr/lib/ruby/gems/1.8 directory. Try 'ruby setup.rb --help' for detailed usage. After some thought and ruby setup.rb --help reading, I run $ ruby setup.rb all --prefix=/home/user --sysconfdir=/home/user/etc \ --siteruby=/home/user/lib/site_ruby And it still replies with hook /home/lowry/hobby/rubygems-0.9.0/./post-install.rb failed: You don't have write permissions into the /usr/lib/ruby/gems/1.8 directory. Try 'ruby setup.rb --help' for detailed usage. How do I install gems into $HOME ?!!! From jim.weirich at gmail.com Sat Nov 4 08:36:25 2006 From: jim.weirich at gmail.com (Jim Weirich) Date: Sat, 4 Nov 2006 08:36:25 -0500 Subject: [Rubygems-developers] gems 0.9.0 on ruby 1.8.2 +ubuntu 6.10 : now way to install to $HOME In-Reply-To: References: Message-ID: On 11/4/06, Alexander Mikhailian wrote: > > Here is I problem I have on a fresh Ubuntu install with the ruby-1.8.2-1 > package. > > After downloading rubygems-0.9.0, I run > > $ ruby setup.rb all --prefix=/home/lowry > > which replies with > > hook /home/lowry/hobby/rubygems-0.9.0/./post-install.rb failed: > You don't have write permissions into the /usr/lib/ruby/gems/1.8 > directory. > Try 'ruby setup.rb --help' for detailed usage. You are almost there. The gem software is correctly installed in /home/lowry at this point. The last step of the install it to create an initial gem repository to hold the gems you install. By default, the gem repository is located in /usr/lib/ruby/gems/1.8 (based on where your ruby interpreter is installed). You can change this by setting the GEM_HOME environment variable. Try this: export GEM_HOME=/home/lowry/lib/ruby/gems/1.8 ruby setup.rb all --prefix=/home/lowry Make sure you set GEM_HOME in your .profile (or setup a .gemrc file) so that future gem operations will find the repository in its non-default location. Otherwise the gem command and any ruby software that uses gems won't find any installed gems. -- -- Jim Weirich jim at weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20061104/2dc96b1e/attachment-0001.html From mikhailian at altern.org Sat Nov 4 14:30:57 2006 From: mikhailian at altern.org (Alexander Mikhailian) Date: Sat, 04 Nov 2006 20:30:57 +0100 Subject: [Rubygems-developers] gems 0.9.0 on ruby 1.8.2 +ubuntu 6.10 : now way to install to $HOME References: Message-ID: > Try this: > > export GEM_HOME=/home/lowry/lib/ruby/gems/1.8 > ruby setup.rb all --prefix=/home/lowry It worked like a charm! But I could not go further. Actually, when I run "gem" from the command line, I get /home/lowry/bin/gem:9:in `require': no such file to load -- rubygems (LoadError) from /home/lowry/bin/gem:9 It probably looks for the file at "lib/site_ruby/1.8/rubygems.rb", but can't find it. Is there some other variable to set so that ~/bin/gem works for my installation? From jim.weirich at gmail.com Sun Nov 5 00:07:43 2006 From: jim.weirich at gmail.com (Jim Weirich) Date: Sun, 5 Nov 2006 00:07:43 -0500 Subject: [Rubygems-developers] gems 0.9.0 on ruby 1.8.2 +ubuntu 6.10 : now way to install to $HOME In-Reply-To: References: Message-ID: On 11/4/06, Alexander Mikhailian wrote: > > > Try this: > > > > export GEM_HOME=/home/lowry/lib/ruby/gems/1.8 > > ruby setup.rb all --prefix=/home/lowry > > It worked like a charm! > > But I could not go further. > > Actually, when I run "gem" from the command line, I get > > /home/lowry/bin/gem:9:in `require': no such file to load -- rubygems > (LoadError) > from /home/lowry/bin/gem:9 > > It probably looks for the file at "lib/site_ruby/1.8/rubygems.rb", but > can't find it. Rubygems was installed in /home/lowry, right? Is that where the Ruby interpreter was installed? If not, you have to let it know where to find its libraries. You can do that by setting an environment variable (something like RUBY_PATH or RUBY_LIB or RUBY_DIR, perhaps without the underscore ... check the documentation). -- -- -- Jim Weirich jim at weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20061105/a9f3f8cf/attachment.html From mikhailian at altern.org Sun Nov 5 09:39:19 2006 From: mikhailian at altern.org (Alexander Mikhailian) Date: Sun, 05 Nov 2006 15:39:19 +0100 Subject: [Rubygems-developers] gems 0.9.0 on ruby 1.8.2 +ubuntu 6.10 : now way to install to $HOME References: Message-ID: On Sun, 05 Nov 2006 00:07:43 -0500, Jim Weirich wrote: > Rubygems was installed in /home/lowry, right? Is that where the Ruby > interpreter was installed? If not, you have to let it know where to find > its libraries. You can do that by setting an environment variable > (something like RUBY_PATH or RUBY_LIB or RUBY_DIR, perhaps without the > underscore ... check the documentation). OK, I did check the documentation, the variable is called RUBYLIB. I set it up to RUBYLIB=/home/lowry/lib/ruby/:/home/lowry/lib/site_ruby/1.8 Now, I am able to run "gem" and it returns a help message, which is already better than what was before. However, "gem install rake" throws out the following: $ gem install rake /home/lowry/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- sources (LoadError) from /home/lowry/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /home/lowry/lib/site_ruby/1.8/rubygems/remote_installer.rb:462:in `sources' from /home/lowry/lib/site_ruby/1.8/rubygems/remote_installer.rb:472:in `source_index_hash' from /home/lowry/lib/site_ruby/1.8/rubygems/remote_installer.rb:436:in `install' from /home/lowry/lib/site_ruby/1.8/rubygems/gem_commands.rb:258:in `execute' from /home/lowry/lib/site_ruby/1.8/rubygems/gem_commands.rb:220:in `execute' from /home/lowry/lib/site_ruby/1.8/rubygems/command.rb:69:in `invoke' from /home/lowry/lib/site_ruby/1.8/rubygems/cmd_manager.rb:117:in `process_args' from /home/lowry/lib/site_ruby/1.8/rubygems/cmd_manager.rb:88:in `run' from /home/lowry/lib/site_ruby/1.8/rubygems/gem_runner.rb:29:in `run' from /home/lowry/bin/gem:23$ gem install rake It looks like I am still unable to work with ruby gems. From jim.weirich at gmail.com Sun Nov 5 16:29:16 2006 From: jim.weirich at gmail.com (Jim Weirich) Date: Sun, 5 Nov 2006 16:29:16 -0500 Subject: [Rubygems-developers] gems 0.9.0 on ruby 1.8.2 +ubuntu 6.10 : now way to install to $HOME In-Reply-To: References: Message-ID: On 11/5/06, Alexander Mikhailian wrote: > > Now, I am able to run "gem" and it returns a help message, which is > already better than what was before. > > However, "gem install rake" throws out the following: > > $ gem install rake > /home/lowry/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require': no such file to load -- sources (LoadError) We are getting close. Can you run the following three commands and tell me what the outputs are: env | grep GEM gem env gem list --local -- -- -- Jim Weirich jim at weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20061105/702be11b/attachment.html From mikhailian at altern.org Mon Nov 6 05:33:13 2006 From: mikhailian at altern.org (Alexander Mikhailian) Date: Mon, 06 Nov 2006 11:33:13 +0100 Subject: [Rubygems-developers] gems 0.9.0 on ruby 1.8.2 +ubuntu 6.10 : now way to install to $HOME References: Message-ID: On Sun, 05 Nov 2006 16:29:16 -0500, Jim Weirich wrote: > Can you run the following three commands and tell me what the outputs are: Actually I made a mistake previously, the error in "gem install rake" was due to the fact that GEM_HOME was unset at this moment. Now, I fixed this this is what your three commands output: > env | grep GEM GEM_HOME=/home/lowry/lib/ruby/gems/1.8 > gem env Rubygems Environment: - VERSION: 0.9.0 (0.9.0) - INSTALLATION DIRECTORY: /home/lowry/lib/ruby/gems/1.8 - GEM PATH: - /home/lowry/lib/ruby/gems/1.8 - REMOTE SOURCES: - http://gems.rubyforge.org > gem list --local *** LOCAL GEMS *** sources (0.0.1) This package provides download sources for remote gem installation "gem install rake" now work like a charm! Thank you for the help! From drnicwilliams at gmail.com Mon Nov 6 06:40:38 2006 From: drnicwilliams at gmail.com (Nic Williams) Date: Mon, 6 Nov 2006 12:40:38 +0100 Subject: [Rubygems-developers] gems 0.9.0 on ruby 1.8.2 +ubuntu 6.10 : now way to install to $HOME In-Reply-To: References: Message-ID: <44b555bb0611060340w6418534dv15408939c2f192b4@mail.gmail.com> Alex, now you can write all that up nicely for the poor soles who follow you :) Nic On 11/6/06, Alexander Mikhailian wrote: > > On Sun, 05 Nov 2006 16:29:16 -0500, Jim Weirich wrote: > > > Can you run the following three commands and tell me what the outputs > are: > > Actually I made a mistake previously, the error in "gem install rake" was > due to the fact that GEM_HOME was unset at this moment. Now, I fixed this > this is what your three commands output: > > > env | grep GEM > GEM_HOME=/home/lowry/lib/ruby/gems/1.8 > > > gem env > > Rubygems Environment: > - VERSION: 0.9.0 (0.9.0) > - INSTALLATION DIRECTORY: /home/lowry/lib/ruby/gems/1.8 > - GEM PATH: > - /home/lowry/lib/ruby/gems/1.8 > - REMOTE SOURCES: > - http://gems.rubyforge.org > > > gem list --local > > *** LOCAL GEMS *** > > sources (0.0.1) > This package provides download sources for remote gem installation > > "gem install rake" now work like a charm! Thank you for the help! > > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > -- Dr Nic Williams http://www.drnicwilliams.com - Ruby/Rails blog skype: nicwilliams (m) +31 62 494 8552 (p) +61 7 3102 3237 (finds me anywhere in the world) (f) +61 7 3305 7572 (sends fax to my email) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20061106/ea49384e/attachment.html From jim at weirichhouse.org Mon Nov 6 09:39:23 2006 From: jim at weirichhouse.org (Jim Weirich) Date: Mon, 6 Nov 2006 14:39:23 -0000 (UTC) Subject: [Rubygems-developers] gems 0.9.0 on ruby 1.8.2 +ubuntu 6.10: now way to install to $HOME In-Reply-To: References: Message-ID: <42959.198.177.158.254.1162823963.squirrel@onestepback.org> Alexander Mikhailian said: > On Sun, 05 Nov 2006 16:29:16 -0500, Jim Weirich wrote: > >> Can you run the following three commands and tell me what the outputs >> are: > > Actually I made a mistake previously, the error in "gem install rake" was > due to the fact that GEM_HOME was unset at this moment. Now, I fixed this > this is what your three commands output: Excellent. If you would like to write down all the steps you had to do to get this to work, I'll make sure the FAQ is updated with this so it will be easier on the next person. Thanks. -- -- Jim Weirich jim at weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) From mikhailian at altern.org Mon Nov 6 17:53:34 2006 From: mikhailian at altern.org (Alexander Mikhailian) Date: Mon, 06 Nov 2006 23:53:34 +0100 Subject: [Rubygems-developers] gems 0.9.0 on ruby 1.8.2 +ubuntu 6.10: now way to install to $HOME References: <42959.198.177.158.254.1162823963.squirrel@onestepback.org> Message-ID: On Mon, 06 Nov 2006 14:39:23 +0000, Jim Weirich wrote: > Excellent. If you would like to write down all the steps you had to do to > get this to work, I'll make sure the FAQ is updated with this so it will > be easier on the next person. Sure! Q: How do I install gems in my home directory? A: You have to redefine the location of the GEM_HOME variable and add the paths to the gem repositories in the RUBYLIB variable before launching the installation into a custom directory. GEM_HOME should point to $PREFIX/lib/ruby/gems/1.8 if it used with the 1.8 version of ruby. RUBYLIB should point to the $PREFIX/lib/ruby and $PREFIX/lib/site_ruby/1.8 Here is a shell script that runs in the rubygems distribution directory to install into /home/user : PREFIX=/home/user export GEM_HOME=$PREFIX/lib/ruby/gems/1.8 export RUBYLIB=$PREFIX/lib/ruby:PREFIX/lib/site_ruby/1.8 ruby setup.rb all --prefix=$PREFIX You may add GEM_HOME and RUBYLIB into your ~/.profile file to automatically load on login. From florian at reitmeir.org Tue Nov 7 09:23:51 2006 From: florian at reitmeir.org (Florian Reitmeir) Date: Tue, 7 Nov 2006 15:23:51 +0100 Subject: [Rubygems-developers] gems 0.9.0 on ruby 1.8.2 +ubuntu 6.10: now way to install to $HOME In-Reply-To: References: <42959.198.177.158.254.1162823963.squirrel@onestepback.org> Message-ID: <20061107142351.GO7437@squat.noreply.org> On Mon, 06 Nov 2006, Alexander Mikhailian wrote: > Here is a shell script that runs in the rubygems > distribution directory to install into /home/user : > > PREFIX=/home/user normally you could use: PREFIX=$HOME > export GEM_HOME=$PREFIX/lib/ruby/gems/1.8 > export RUBYLIB=$PREFIX/lib/ruby:PREFIX/lib/site_ruby/1.8 if think this should be: export RUBYLIB=$PREFIX/lib/ruby:$PREFIX/lib/site_ruby/1.8 > ruby setup.rb all --prefix=$PREFIX > > You may add GEM_HOME and RUBYLIB into your ~/.profile file to > automatically load on login. -- Florian Reitmeir From drbrain at segment7.net Wed Nov 15 04:10:06 2006 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 15 Nov 2006 01:10:06 -0800 Subject: [Rubygems-developers] Local installation w/deps (or, So I'm writing a Tinderbox...) Message-ID: <890F8533-AA14-4C8E-B17A-4A3DAC78179C@segment7.net> Well, Evan Phoenix wrote the Tinderbox web site and I've built (most of) the gem runner. Maybe next week we'll have it all put together. The basic idea is to install a gem into a sandbox (with dependencies), run the gem's tests, then post the results of the tests on a website to the shame of all who failed to make their tests pass. (Maybe I'll even add a couple of leaderboards, including "most assertions" and "most dooomed".) Anyhow... My main issue is installing gems. I flushed out a few bugs I found in Rubygems related to installing gems in a sandbox and have fixed those. Now I have the problem of the discontinuity between local and remote installation. Remote installation automatically installs all dependencies. Local installation only installs the named gem. I don't want to fetch every gem every time over the internet. That's just not nice. I don't want to re-write the three or four methods in RemoteInstaller that handle dependencies into Tinderbox::GemRunner. So, what's the plan to unify the two? I have the motivation, interest, and time. I imagine the stupid-simple version would take about a day. Oh, instead, can I do something fancy with the gems in the cache dir? If a file lives there does rubygems skip a trip out to the internet? (I haven't looked, its late and the idea just popped into my head.) And one more thing. Tinderbox::GemRunner copies the source_cache from the host gem repository into the sandbox to cut down on source_cache fetches, but I still see a lot of them. Sometimes even back-to-back. Is there something in Rubygems I should be poking at to make this go away? Should Rubygems ever do a bulk update once it has a source_cache? -- Eric Hodel - drbrain at segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com From florian at epcc.ed.ac.uk Wed Nov 15 10:50:41 2006 From: florian at epcc.ed.ac.uk (Florian Scharinger) Date: Wed, 15 Nov 2006 15:50:41 +0000 Subject: [Rubygems-developers] Local install on Solaris fails Message-ID: <455B3751.2060508@epcc.ed.ac.uk> Hi, I'm trying to install rubygems in my user directory on a Solaris 9 machine, but fail in the last step. I followed this description: http://docs.rubygems.org/read/chapter/3#page83 and also read and tried the recent post: http://rubyforge.org/pipermail/rubygems-developers/2006-November/002201.html The installation fails in the last step "ruby setup.rb install", with the following output: As of RubyGems 0.8.0, library stubs are no longer needed. Searching $LOAD_PATH for stubs to optionally delete (may take a while)... ...done. No library stubs found. /usr/local/lib/ruby/1.8/sparc-solaris2.9/digest/md5.so: ld.so.1: ruby: fatal: libcrypto.so.0.9.8: open failed: No such file or directory - /usr/local/lib/ruby/1.8/sparc-solaris2.9/digest/md5.so (LoadError) from ./lib/rubygems/custom_require.rb:27:in `require' from ./lib/rubygems/package.rb:10 from ./lib/rubygems/custom_require.rb:27:in `require' from ./lib/rubygems/builder.rb:7 from ./lib/rubygems/custom_require.rb:27:in `require' from ./lib/rubygems.rb:93:in `manage_gems' from /home/scharinf/tmp/rubygems-0.9.0/./post-install.rb:70:in `install_sources' from /home/scharinf/tmp/rubygems-0.9.0/./post-install.rb:81:in `try_run_hook' from setup.rb:577:in `run_hook' from setup.rb:1315:in `exec_task_traverse' from setup.rb:1168:in `exec_install' from setup.rb:887:in `exec_install' from setup.rb:710:in `invoke' from setup.rb:674:in `invoke' from setup.rb:1352 What can I do that the "libcrypto.so.0.9.8" is found, or work around it? My main problem is that I'm just a user, and cannot modify the system really... Thx in advance for any help, Florian. From yvon_thoraval at mac.com Tue Nov 14 11:27:33 2006 From: yvon_thoraval at mac.com (Yvon Thoraval) Date: Tue, 14 Nov 2006 17:27:33 +0100 Subject: [Rubygems-developers] uninitialized constant Gem::CommandManager::HelpCommand (NameError) Message-ID: <017C094B-5B36-4D80-8714-DD32260B9DF4@mac.com> Hey all, after updating ruby (1.8.5_1) with MacPORT i can't even list available gems because i get : gem list /opt/local/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:52:in `initialize': uninitialized constant Gem::CommandManager::HelpCommand (NameError) from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ cmd_manager.rb:46:in `new' from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ cmd_manager.rb:46:in `instance' from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ gem_runner.rb:25:in `run' from /opt/local/bin/gem:23 i've the following env vars related to ruby/rubygems : $ env | grep GEM GEM_HOME=/opt/local/lib/ruby/gems/1.8 RGEM_HOME=/opt/local/lib/ruby/gems/1.8 // (sort of backup copy of GEM_HOME) JGEM_HOME=/Users/yvon/SVN/jruby/lib/ruby/gems/1.8 // used by JRuby JRUBYGEMS=/Users/yvon/SVN/jruby/lib/ruby/site_ruby/1.8 // used by JRuby notice my hand install of rubygems under JRuby is working fine. $ gem env /opt/local/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:52:in `initialize': uninitialized constant Gem::CommandManager::HelpCommand (NameError) from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ cmd_manager.rb:46:in `new' from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ cmd_manager.rb:46:in `instance' from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ gem_runner.rb:25:in `run' from /opt/local/bin/gem:23 $ gem list --local same error as before. $ echo $RUBYOPT rubygems $ echo $RUBYLIB /opt/local/lib/ruby/:/opt/local/lib/ruby/site_ruby/1.8 $ which ruby /opt/local/bin/ruby $ which gem /opt/local/bin/gem how could I get rubygems working back ? best Yvon From drbrain at segment7.net Wed Nov 15 17:37:47 2006 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 15 Nov 2006 14:37:47 -0800 Subject: [Rubygems-developers] rubygems/loadpath_manager Message-ID: <5681615F-919E-4B33-9C7D-D957C0914883@segment7.net> This seems to be a candidate for deletion. Several comments say it has been replaced by custom_require.rb Can I remove it? -- Eric Hodel - drbrain at segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com From drbrain at segment7.net Fri Nov 17 04:58:56 2006 From: drbrain at segment7.net (Eric Hodel) Date: Fri, 17 Nov 2006 01:58:56 -0800 Subject: [Rubygems-developers] Local installation w/deps (or, So I'm writing a Tinderbox...) In-Reply-To: <890F8533-AA14-4C8E-B17A-4A3DAC78179C@segment7.net> References: <890F8533-AA14-4C8E-B17A-4A3DAC78179C@segment7.net> Message-ID: <7D3E7CCC-7F99-4B92-A3D0-4A0DE3AEA870@segment7.net> On Nov 15, 2006, at 1:10 AM, Eric Hodel wrote: > Now I have the problem of the discontinuity between local and remote > installation. Remote installation automatically installs all > dependencies. Local installation only installs the named gem. > > I don't want to fetch every gem every time over the internet. That's > just not nice. > > I don't want to re-write the three or four methods in RemoteInstaller > that handle dependencies into Tinderbox::GemRunner. > > So, what's the plan to unify the two? I have the motivation, > interest, and time. I imagine the stupid-simple version would take > about a day. Well, in my quest to make rubygems more handy to my needs (to make it more scriptable) I've been changing stuff. I'll be refactoring out the source updating portion next so I can update source_index without attempting to install a gem which should make unification a little easier. -- Eric Hodel - drbrain at segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com From drbrain at segment7.net Mon Nov 20 00:34:54 2006 From: drbrain at segment7.net (Eric Hodel) Date: Sun, 19 Nov 2006 21:34:54 -0800 Subject: [Rubygems-developers] HEADS-UP RemoteInstaller overhaul, check proxy workings Message-ID: I've pulled all the code for updating source indexes out of: Gem::RemoteInstaller Gem::RemoteFetcher Gem::CachedFetcher Gem::IncrementalFetcher (the last two files disappearing altogether) and moved the functionality into: Gem::SourceInfoCache Gem::SourceInfoCacheEntry Gem::SourceIndex and made a bunch of other changes to support this work. In all there was about 600 lines of change to lib/ with rubygems dropping in size by about 120 lines. If any problems were to pop up, I expect them to be in specifying an HTTP proxy on the command-line. Gem::RemoteFetcher is no longer source-specific, so it fetches its proxy information from ENV as usual or from Gem.configuration. I'm not sure if I'm adding the command line proxy options to Gem.configuration correctly or not, though. I've run gem update and gem install and gem list, and all seem to be working OK. Because of this work you can now easily do fun things like examine the source index: irb(main):001:0> require 'rubygems/source_info_cache' => true irb(main):002:0> Gem::SourceInfoCache.search(/ZenTest/).map { |spec| spec.full_name } => ["ZenTest-3.0.0", "ZenTest-3.1.0", "ZenTest-3.2.0", "ZenTest-3.3.0", "ZenTest-3.4.0", "ZenTest-3.4.1", "ZenTest-3.4.2"] or refresh the source index from its sources: irb(main):009:0> Gem::SourceInfoCache.cache.refresh -- Eric Hodel - drbrain at segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com From drbrain at segment7.net Mon Nov 20 00:35:02 2006 From: drbrain at segment7.net (Eric Hodel) Date: Sun, 19 Nov 2006 21:35:02 -0800 Subject: [Rubygems-developers] SourceIndex self update Message-ID: It would be nice if a SourceIndex knew how to update itself. To do this it would need to know its source_uri and size. The SourceInfoCacheEntry layer of indirection would then go away. I was worried about backwards compatibility in the YAML dump, so I didn't make this change. -- Eric Hodel - drbrain at segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com From bob.cotton at rallydev.com Mon Nov 20 07:53:56 2006 From: bob.cotton at rallydev.com (Bob Cotton) Date: Mon, 20 Nov 2006 05:53:56 -0700 Subject: [Rubygems-developers] Question about install ext files (.so) into arch specific directories Message-ID: I'm trying to get a gem to install the platform specific files into /lib/ where arch is ::Config::CONFIG['arch']. I've figured out how to get the specfile to add the correct directories to the load path: s.require_paths = ["lib", "lib/#{::Config::CONFIG['arch']}"] However, I can't seem to make mkmf create a Makefile that will install the files into the correct directory. I've tried setting target_prefix in extconf.rb to no avail. And ideas? Thanks -Bob -- Rally Wins 2006 Jolt Award for Product Excellence! Test drive the leading on-demand software life cycle management solution today: http://www.rallydev.com/try_it.jsp From drbrain at segment7.net Mon Nov 20 21:06:09 2006 From: drbrain at segment7.net (Eric Hodel) Date: Mon, 20 Nov 2006 18:06:09 -0800 Subject: [Rubygems-developers] SourceIndex self update In-Reply-To: References: Message-ID: <26F98BBF-DF02-46EC-A1EC-0AD9C3781AC3@segment7.net> On Nov 19, 2006, at 9:35 PM, Eric Hodel wrote: > It would be nice if a SourceIndex knew how to update itself. To do > this it would need to know its source_uri and size. The > SourceInfoCacheEntry layer of indirection would then go away. > > I was worried about backwards compatibility in the YAML dump, so I > didn't make this change. Actually, not including @source_uri and @size in yaml_properties should solve the backwards compatiblity problem. It is unreasonable to expect a SourceIndex to know its own yaml size. That leaves the problem of automatically upgrading a SourceInfoCache. Is it worth it? -- Eric Hodel - drbrain at segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com From jim.weirich at gmail.com Mon Nov 27 07:08:38 2006 From: jim.weirich at gmail.com (Jim Weirich) Date: Mon, 27 Nov 2006 07:08:38 -0500 Subject: [Rubygems-developers] HEADS-UP RemoteInstaller overhaul, check proxy workings In-Reply-To: References: Message-ID: On 11/20/06, Eric Hodel wrote: > > I've pulled all the code for updating source indexes out of: [...] If any problems were to pop up, I expect them to be in specifying an > HTTP proxy on the command-line. Gem::RemoteFetcher is no longer > source-specific, so it fetches its proxy information from ENV as > usual or from Gem.configuration. I'm not sure if I'm adding the > command line proxy options to Gem.configuration correctly or not, > though. [...] Cool! I just started looking at this. There is a functional test that is failing. Apparently RemoteInstaller#sources no longer exists. If this method isn't being used anywhere other than the test, then perhaps the test should be rewritten. (Obviously we get the sources from somewhere because the command line function still works). I've bump the version to 0.9.0.7 and put a beta-gem on http://onestepback.org/betagems if people want to run this version (particularly the proxy stuff). -- Jim Weirich -- -- -- Jim Weirich jim at weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20061127/2064407d/attachment-0001.html From dsisnero at gmail.com Mon Nov 27 15:47:52 2006 From: dsisnero at gmail.com (Dominic Sisneros) Date: Mon, 27 Nov 2006 13:47:52 -0700 Subject: [Rubygems-developers] gem update --except ferret Message-ID: Hi, I am on a windows machine and when I try to do a gem update, it always fails after trying to update ferret, which has a windows compiled version a few versions behind the current native compiled on the fly version. What I was wondering, if there could be a option to exclude a gem from trying to update, i.e.; gem update --except ferret or, if there can be a command line option to list gems needing to be updated, which we can then do individually gem update --list_outdated --> [out1, out2,..] gem install out1 gem install out2 ... thanks dom -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20061127/aa3ed242/attachment.html From thewoolleyman at gmail.com Tue Nov 28 16:24:55 2006 From: thewoolleyman at gmail.com (Chad Woolley) Date: Tue, 28 Nov 2006 13:24:55 -0800 Subject: [Rubygems-developers] Enhancement Proposal: Would like be able to programatically specify platform Message-ID: Hello, I'm writing a tool ("geminstaller" on RubyForge) which will automatically install all required gem versions for an app/server, based on a config file. This is inspired by the way Maven handles dependency auto-download for Java. Anyway, it's almost releasable, except for one hitch: I can't figure out how to programatically specify a platform for multiplatform/binary gems; I always get prompted with the list of platform/version choices. The crux of the problem seems to be in Gem::RemoteInstaller.find_gem_to_install. It appears to be hardcoded to prompt the user with a list of all gems if any binary gems exist, with no way to programatically specify an exact name + version + platform. I can hack around this by overriding this method, as well as the entire call stack up through InstallCommand, etc. I'm currently using GemRunner as my interface point to invoke RubyGems, because I want to avoid digging into the guts of RubyGems as much as possible. However, this approach would require me to override several methods (at least 4 I've found so far). I really don't like this, because it's asking for forward-compatibility problems when new releases of RubyGems are released. So, what is your advice? Am I missing some easy solution to this? If not, would you RubyGem developers be up for accepting a patch which adds platform-specifying capability to the current code (including an appropriate command line option)? If so, I'd like to contribute it. I'd still have to hack around it for backward compatibility with prior RubyGem releases, but it would be nice to know I wouldn't have to worry about forward compatibility. Plus I think it would be a nice feature :) Thanks, Chad P.S. Sorry if this has already been discussed in a prior thread, I just joined the group and was too lazy to search the archives. From daesan at gmail.com Tue Nov 28 16:46:12 2006 From: daesan at gmail.com (Dae San Hwang) Date: Wed, 29 Nov 2006 06:46:12 +0900 Subject: [Rubygems-developers] Feature Request: RubyGems namespace Message-ID: <3831FDDC-388A-4ABC-B004-034BB2A3C132@gmail.com> Hello, Recently, I was thinking about a better way of implementing Rails plugin system. There are two things that I don't particularly like about Rails plugin system. One is the code duplication. You have to install same plugin codes over and over for all of your Rails applications. The other problem is that you have to learn to use yet another utility(script/plugin) and its repository is not centrally managed. So, I was thinking if RubyGems have a namespace built in, we could make all Rails Plugins into gems under 'rails' namespace. To install 'active_form' Rails plugin on the system, you could simply use 'gem' utility like 'gem install rails/active_form'. To use this plugin in a rails application, you could just turn on the plugin in 'config/environment.rb' file by setting 'config.plugins = [:ujs, :active_form]'. I think namespace functionality can be useful for other ruby applications/libraries like 'rake', as well. Can this be considered? :) Dae San Hwang daesan at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20061129/6631b64c/attachment.html From anatol.pomozov at gmail.com Wed Nov 29 00:30:13 2006 From: anatol.pomozov at gmail.com (Anatol Pomozov) Date: Wed, 29 Nov 2006 08:30:13 +0300 Subject: [Rubygems-developers] Feature Request: RubyGems namespace In-Reply-To: <3831FDDC-388A-4ABC-B004-034BB2A3C132@gmail.com> References: <3831FDDC-388A-4ABC-B004-034BB2A3C132@gmail.com> Message-ID: <3665a1a00611282130x33bc6b8es83c29c7f240d8706@mail.gmail.com> Hi, Dae. Very good idea. And I would like to see something similar in RubyGems. If rails (rake, whatever) plugins would be shared as gems we could solve a lot of problems for them: - easy of instalation - automatic updates just with 'ruby update' or 'ruby update --source=rails_plugins_url' - central repository (rubygems repo could be hosted on rubyonrails.org) - only one copy of plugin in system >> setting 'config.plugins = [:ujs, :active_form]' Of course we need "frozing" specific version of plugin, lets say 0.3.5 for Globalize, like we have for standard RubyGems On 11/29/06, Dae San Hwang wrote: > > Hello, > > Recently, I was thinking about a better way of implementing Rails plugin > system. There are two things that I don't particularly like about Rails > plugin system. One is the code duplication. You have to install same plugin > codes over and over for all of your Rails applications. The other problem is > that you have to learn to use yet another utility(script/plugin) and its > repository is not centrally managed. > > So, I was thinking if RubyGems have a namespace built in, we could make > all Rails Plugins into gems under 'rails' namespace. > > To install 'active_form' Rails plugin on the system, you could simply use > 'gem' utility like 'gem install rails/active_form'. To use this plugin in a > rails application, you could just turn on the plugin in > 'config/environment.rb' file by setting 'config.plugins = > [:ujs, :active_form]'. > > I think namespace functionality can be useful for other ruby > applications/libraries like 'rake', as well. Can this be considered? :) > > Dae San Hwang > daesan at gmail.com > > > > > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > > -- anatol (http://feeds.feedburner.com/apomozov-eng) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20061129/5d81e087/attachment.html From ingo at ingoweiss.com Wed Nov 29 00:20:54 2006 From: ingo at ingoweiss.com (Ingo Weiss) Date: Wed, 29 Nov 2006 00:20:54 -0500 Subject: [Rubygems-developers] problem unpacking 0.9.0 Message-ID: Hi, I am in the process of installing rails using the instructions at http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger However, downloading and trying to unpack rubygems like this: curl -O http://rubyforge.iasi.roedu.net/files/rubygems/rubygems-0.9.0.tgz tar xzvf rubygems-0.9.0.tgz results in an error: gzip: stdin: not in gzip format tar: Child returned status 1 I tried downloading the files directly from rubyforge and unpacking it in the finder, but that creates an error, too. Please help! Thanks!!! Ingo Weiss From assaph at gmail.com Wed Nov 29 04:10:18 2006 From: assaph at gmail.com (Assaph Mehr) Date: Wed, 29 Nov 2006 20:10:18 +1100 Subject: [Rubygems-developers] problem unpacking 0.9.0 In-Reply-To: References: Message-ID: <3ff47be90611290110u4330c599j3c70dca8d77359fe@mail.gmail.com> > curl -O > http://rubyforge.iasi.roedu.net/files/rubygems/rubygems-0.9.0.tgz The address you quote just gave me a 404. Try downloading straight from the source (with a browser, in case of redirects): http://rubyforge.org/frs/?group_id=126&release_id=5803 HTH, Assaph From drbrain at segment7.net Wed Nov 29 04:12:00 2006 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 29 Nov 2006 01:12:00 -0800 Subject: [Rubygems-developers] Enhancement Proposal: Would like be able to programatically specify platform In-Reply-To: References: Message-ID: <25FD86AA-2817-4272-B0BF-0B9CE10D7B12@segment7.net> On Nov 28, 2006, at 1324 , Chad Woolley wrote: > I can't figure out how to programatically specify a platform for > multiplatform/binary > gems; I always get prompted with the list of platform/version choices. I need this too for the tinderbox. Expect a fix shortly after the tinderbox goes public, unless Chad and Jim jump all over it. -- Eric Hodel - drbrain at segment7.net - http://blog.segment7.net I LIT YOUR GEM ON FIRE! From drbrain at segment7.net Wed Nov 29 04:15:10 2006 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 29 Nov 2006 01:15:10 -0800 Subject: [Rubygems-developers] Feature Request: RubyGems namespace In-Reply-To: <3665a1a00611282130x33bc6b8es83c29c7f240d8706@mail.gmail.com> References: <3831FDDC-388A-4ABC-B004-034BB2A3C132@gmail.com> <3665a1a00611282130x33bc6b8es83c29c7f240d8706@mail.gmail.com> Message-ID: <88FACD16-EF3F-4565-9585-66B7BC7285B3@segment7.net> On Nov 28, 2006, at 2130 , Anatol Pomozov wrote: > - automatic updates just with 'ruby update' or 'ruby update -- > source=rails_plugins_url' > - central repository (rubygems repo could be hosted on > rubyonrails.org) > - only one copy of plugin in system I'd like to teach source_info_cache to remember other sources it encounters. This will take some work, though, and probably will end up as an extra command like 'gem add_source'/'gem remove_source'. I haven't decided if it is worthwhile or not. -- Eric Hodel - drbrain at segment7.net - http://blog.segment7.net I LIT YOUR GEM ON FIRE! From transfire at gmail.com Wed Nov 29 05:44:32 2006 From: transfire at gmail.com (TRANS) Date: Wed, 29 Nov 2006 05:44:32 -0500 Subject: [Rubygems-developers] Feature Request: RubyGems namespace In-Reply-To: <3831FDDC-388A-4ABC-B004-034BB2A3C132@gmail.com> References: <3831FDDC-388A-4ABC-B004-034BB2A3C132@gmail.com> Message-ID: <4b6f054f0611290244p53796304vbd6fad204a90a715@mail.gmail.com> On 11/28/06, Dae San Hwang wrote: > > Recently, I was thinking about a better way of implementing Rails plugin > system. There are two things that I don't particularly like about Rails > plugin system. One is the code duplication. You have to install same plugin > codes over and over for all of your Rails applications. The other problem is > that you have to learn to use yet another utility(script/plugin) and its > repository is not centrally managed. > > So, I was thinking if RubyGems have a namespace built in, we could make all > Rails Plugins into gems under 'rails' namespace. > > To install 'active_form' Rails plugin on the system, you could simply use > 'gem' utility like 'gem install rails/active_form'. To use this plugin in a > rails application, you could just turn on the plugin in > 'config/environment.rb' file by setting 'config.plugins = [:ujs, > :active_form]'. > > I think namespace functionality can be useful for other ruby > applications/libraries like 'rake', as well. Can this be considered? :) But isn't "copy" reusability one of the points of plugins so that they can be modifed per app if need be? Otherwise what's really the difference between a plugin and a normal library? T. From jim.weirich at gmail.com Wed Nov 29 07:32:25 2006 From: jim.weirich at gmail.com (Jim Weirich) Date: Wed, 29 Nov 2006 07:32:25 -0500 Subject: [Rubygems-developers] gem update --except ferret In-Reply-To: References: Message-ID: On 11/27/06, Dominic Sisneros wrote: > > Hi, > > I am on a windows machine and when I try to do a gem update, it always > fails after trying to update ferret, which has a windows compiled version a > few versions behind the current native compiled on the fly version. > What I was wondering, if there could be a option to exclude a gem from > trying to update, > > i.e.; gem update --except ferret There is no current option for that, however ... or, if there can be a command line option to list gems needing to be > updated, which we can then do individually > > gem update --list_outdated --> [out1, out2,..] This already works. For example: gem update rake flexmock will update both gems. -- -- -- Jim Weirich jim at weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20061129/4cfa8f51/attachment.html From daesan at gmail.com Wed Nov 29 07:49:32 2006 From: daesan at gmail.com (Dae San Hwang) Date: Wed, 29 Nov 2006 21:49:32 +0900 Subject: [Rubygems-developers] Feature Request: RubyGems namespace In-Reply-To: <4b6f054f0611290244p53796304vbd6fad204a90a715@mail.gmail.com> References: <3831FDDC-388A-4ABC-B004-034BB2A3C132@gmail.com> <4b6f054f0611290244p53796304vbd6fad204a90a715@mail.gmail.com> Message-ID: <9A54DC35-1E86-40EF-98B9-AF0ABD329843@gmail.com> On Nov 29, 2006, at 7:44 PM, TRANS wrote: > On 11/28/06, Dae San Hwang wrote: >> >> Recently, I was thinking about a better way of implementing Rails >> plugin >> system. There are two things that I don't particularly like about >> Rails >> plugin system. One is the code duplication. You have to install >> same plugin >> codes over and over for all of your Rails applications. The other >> problem is >> that you have to learn to use yet another utility(script/plugin) >> and its >> repository is not centrally managed. >> >> So, I was thinking if RubyGems have a namespace built in, we could >> make all >> Rails Plugins into gems under 'rails' namespace. >> >> To install 'active_form' Rails plugin on the system, you could >> simply use >> 'gem' utility like 'gem install rails/active_form'. To use this >> plugin in a >> rails application, you could just turn on the plugin in >> 'config/environment.rb' file by setting 'config.plugins = [:ujs, >> :active_form]'. >> >> I think namespace functionality can be useful for other ruby >> applications/libraries like 'rake', as well. Can this be >> considered? :) > > But isn't "copy" reusability one of the points of plugins so that they > can be modifed per app if need be? Otherwise what's really the > difference between a plugin and a normal library? The way I think of plugins is that plugins are used to modify/extend the existing classes provided by Rails. Libraries are used for providing new classes but I don't see why RubyGems can't be used for both libraries and plugins. If the need for customizing a plugin for an application arises, maybe we can just unpack the plugin gem and modify it in place? Dae San Hwang daesan at gmail.com From chad at chadfowler.com Wed Nov 29 08:00:50 2006 From: chad at chadfowler.com (Chad Fowler) Date: Wed, 29 Nov 2006 07:00:50 -0600 Subject: [Rubygems-developers] Feature Request: RubyGems namespace In-Reply-To: <3831FDDC-388A-4ABC-B004-034BB2A3C132@gmail.com> References: <3831FDDC-388A-4ABC-B004-034BB2A3C132@gmail.com> Message-ID: On 11/28/06, Dae San Hwang wrote: > > Hello, > > Recently, I was thinking about a better way of implementing Rails plugin > system. There are two things that I don't particularly like about Rails > plugin system. One is the code duplication. You have to install same plugin > codes over and over for all of your Rails applications. The other problem is > that you have to learn to use yet another utility(script/plugin) and its > repository is not centrally managed. > > So, I was thinking if RubyGems have a namespace built in, we could make all > Rails Plugins into gems under 'rails' namespace. > > To install 'active_form' Rails plugin on the system, you could simply use > 'gem' utility like 'gem install rails/active_form'. To use this plugin in a > rails application, you could just turn on the plugin in > 'config/environment.rb' file by setting 'config.plugins = [:ujs, > :active_form]'. > > I think namespace functionality can be useful for other ruby > applications/libraries like 'rake', as well. Can this be considered? :) > > Dae San Hwang > daesan at gmail.com > > > Hi. Have you seen Bruce Williams' work in this area? http://codefluency.com/2006/11/29/rubygem-based-rails-plugins Chad From chad at chadfowler.com Wed Nov 29 08:04:17 2006 From: chad at chadfowler.com (Chad Fowler) Date: Wed, 29 Nov 2006 07:04:17 -0600 Subject: [Rubygems-developers] Enhancement Proposal: Would like be able to programatically specify platform In-Reply-To: References: Message-ID: On 11/28/06, Chad Woolley wrote: > Hello, > > I'm writing a tool ("geminstaller" on RubyForge) which will > automatically install all required gem versions for an app/server, > based on a config file. This is inspired by the way Maven handles > dependency auto-download for Java. > > Anyway, it's almost releasable, except for one hitch: I can't figure > out how to programatically specify a platform for multiplatform/binary > gems; I always get prompted with the list of platform/version choices. > > The crux of the problem seems to be in > Gem::RemoteInstaller.find_gem_to_install. It appears to be hardcoded > to prompt the user with a list of all gems if any binary gems exist, > with no way to programatically specify an exact name + version + > platform. > > I can hack around this by overriding this method, as well as the > entire call stack up through InstallCommand, etc. I'm currently using > GemRunner as my interface point to invoke RubyGems, because I want to > avoid digging into the guts of RubyGems as much as possible. > However, this approach would require me to override several methods > (at least 4 I've found so far). I really don't like this, because > it's asking for forward-compatibility problems when new releases of > RubyGems are released. > > So, what is your advice? Am I missing some easy solution to this? If > not, would you RubyGem developers be up for accepting a patch which > adds platform-specifying capability to the current code (including an > appropriate command line option)? If so, I'd like to contribute it. > I'd still have to hack around it for backward compatibility with prior > RubyGem releases, but it would be nice to know I wouldn't have to > worry about forward compatibility. Plus I think it would be a nice > feature :) > > Thanks, > Chad > > P.S. Sorry if this has already been discussed in a prior thread, I > just joined the group and was too lazy to search the archives. > _______________________________________________ Hi. You're right that this is a limitation. Jim and I discussed it at length at the recent Rails Edge conference. We have a solution in mind, but we haven't started hacking yet. Chad From thewoolleyman at gmail.com Wed Nov 29 12:11:04 2006 From: thewoolleyman at gmail.com (Chad Woolley) Date: Wed, 29 Nov 2006 10:11:04 -0700 Subject: [Rubygems-developers] Enhancement Proposal: Would like be able to programatically specify platform In-Reply-To: References: Message-ID: On 11/29/06, Chad Fowler wrote: > On 11/28/06, Chad Woolley wrote: > > Hello, > > > > I'm writing a tool ("geminstaller" on RubyForge) which will > > automatically install all required gem versions for an app/server, > > based on a config file. This is inspired by the way Maven handles > > dependency auto-download for Java. > > > > Anyway, it's almost releasable, except for one hitch: I can't figure > > out how to programatically specify a platform for multiplatform/binary > > gems; I always get prompted with the list of platform/version choices. > > > > The crux of the problem seems to be in > > Gem::RemoteInstaller.find_gem_to_install. It appears to be hardcoded > > to prompt the user with a list of all gems if any binary gems exist, > > with no way to programatically specify an exact name + version + > > platform. > > > > I can hack around this by overriding this method, as well as the > > entire call stack up through InstallCommand, etc. I'm currently using > > GemRunner as my interface point to invoke RubyGems, because I want to > > avoid digging into the guts of RubyGems as much as possible. > > However, this approach would require me to override several methods > > (at least 4 I've found so far). I really don't like this, because > > it's asking for forward-compatibility problems when new releases of > > RubyGems are released. > > > > So, what is your advice? Am I missing some easy solution to this? If > > not, would you RubyGem developers be up for accepting a patch which > > adds platform-specifying capability to the current code (including an > > appropriate command line option)? If so, I'd like to contribute it. > > I'd still have to hack around it for backward compatibility with prior > > RubyGem releases, but it would be nice to know I wouldn't have to > > worry about forward compatibility. Plus I think it would be a nice > > feature :) > > > > Thanks, > > Chad > > > > P.S. Sorry if this has already been discussed in a prior thread, I > > just joined the group and was too lazy to search the archives. > > _______________________________________________ > > > Hi. You're right that this is a limitation. Jim and I discussed it > at length at the recent Rails Edge conference. We have a solution in > mind, but we haven't started hacking yet. > > Chad Hi Chad, Great! Let me know when you guys start, and if I beat you to it I'll let you know. Like I said, I've got to hack backward compatibility first, then I'll try to take a look at it. Thanks, Chad From drbrain at segment7.net Wed Nov 29 14:40:29 2006 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 29 Nov 2006 11:40:29 -0800 Subject: [Rubygems-developers] Enhancement Proposal: Would like be able to programatically specify platform In-Reply-To: References: Message-ID: <01C905AA-0D98-4346-B444-7A68EDE44C0C@segment7.net> On Nov 29, 2006, at 0504 , Chad Fowler wrote: > On 11/28/06, Chad Woolley wrote: >> Anyway, it's almost releasable, except for one hitch: I can't figure >> out how to programatically specify a platform for multiplatform/ >> binary >> gems; I always get prompted with the list of platform/version >> choices. > > Hi. You're right that this is a limitation. Jim and I discussed it > at length at the recent Rails Edge conference. We have a solution in > mind, but we haven't started hacking yet. Can you discuss details? I'd like the tinderbox to not waste time and bandwidth attempting to run non-platform gems. (And be capable of running platform gems.) -- Eric Hodel - drbrain at segment7.net - http://blog.segment7.net I LIT YOUR GEM ON FIRE! From daesan at gmail.com Wed Nov 29 17:21:35 2006 From: daesan at gmail.com (Dae San Hwang) Date: Thu, 30 Nov 2006 07:21:35 +0900 Subject: [Rubygems-developers] Feature Request: RubyGems namespace In-Reply-To: References: <3831FDDC-388A-4ABC-B004-034BB2A3C132@gmail.com> Message-ID: <1301BD7D-6E64-4B46-8879-225B7E264FD9@gmail.com> On Nov 29, 2006, at 10:00 PM, Chad Fowler wrote: > On 11/28/06, Dae San Hwang wrote: >> >> Hello, >> >> Recently, I was thinking about a better way of implementing Rails >> plugin >> system. There are two things that I don't particularly like about >> Rails >> plugin system. One is the code duplication. You have to install >> same plugin >> codes over and over for all of your Rails applications. The other >> problem is >> that you have to learn to use yet another utility(script/plugin) >> and its >> repository is not centrally managed. >> >> So, I was thinking if RubyGems have a namespace built in, we could >> make all >> Rails Plugins into gems under 'rails' namespace. >> >> To install 'active_form' Rails plugin on the system, you could >> simply use >> 'gem' utility like 'gem install rails/active_form'. To use this >> plugin in a >> rails application, you could just turn on the plugin in >> 'config/environment.rb' file by setting 'config.plugins = [:ujs, >> :active_form]'. >> >> I think namespace functionality can be useful for other ruby >> applications/libraries like 'rake', as well. Can this be >> considered? :) >> >> Dae San Hwang >> daesan at gmail.com >> >> >> > > Hi. Have you seen Bruce Williams' work in this area? > > http://codefluency.com/2006/11/29/rubygem-based-rails-plugins Hi Chad. What a timing! It is just what I had in my mind. :) Dae San From drbrain at segment7.net Thu Nov 30 03:02:57 2006 From: drbrain at segment7.net (Eric Hodel) Date: Thu, 30 Nov 2006 00:02:57 -0800 Subject: [Rubygems-developers] rubygems/open-uri.rb Message-ID: When using rubygems with a program that has (or will) be using the built-in open-uri, rubygems causes an infinite loop because Kernel#open is redefined twice. I'd like to prevent the namespace collision. Is rubygems/open-uri still necessary? What was the issue with the rubygems open-uri? Can we just ditch open-uri and use net/http to keep rubygems working on older versions? -- Eric Hodel - drbrain at segment7.net - http://blog.segment7.net I LIT YOUR GEM ON FIRE! From thibaut.barrere at gmail.com Thu Nov 30 03:23:23 2006 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Thu, 30 Nov 2006 09:23:23 +0100 Subject: [Rubygems-developers] Good practices to freeze gems ? (outside rails) Message-ID: <4a68b8cf0611300023i14a3d1abj8b9a878e96d48aae@mail.gmail.com> Hi I think it's my first post here, so hello! I've been looking for a rubygems-users list but could not find it - so I'm not sure it's appropriate to post that kind of questions here... I'm working with some ruby scripts stored under subversion. Some of those scripts requires gems (like the builder gem for instance, or activerecord). I'd like to avoid to have to run 'gem install builder' on each developer machine, in order to rely solely on what is in subversion. For that purpose I've unpacked the required gems in a version-controlled folder. Is there a preferred way of telling the gems loader to include all the unpacked gems available in this folder ? (while keeping the "require 'builder'" statement working ?) best regards and thanks for rubygems! Thibaut Barr?re -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20061130/18eda64f/attachment-0001.html From dsisnero at gmail.com Thu Nov 30 03:26:47 2006 From: dsisnero at gmail.com (Dominic Sisneros) Date: Thu, 30 Nov 2006 01:26:47 -0700 Subject: [Rubygems-developers] gem update --except ferret In-Reply-To: References: Message-ID: Jim, Thanks for the reply. I haven't really browsed the code but there must be a method that gets an array of the gems that need to be updated. Can we have an option or command to just list these gems that need updating. gem outdated => [gem1,gem2,gem3,ferret] gem update gem1 gem2 gem3 Thanks dom On 11/29/06, Jim Weirich wrote: > > On 11/27/06, Dominic Sisneros wrote: > > > > Hi, > > > > I am on a windows machine and when I try to do a gem update, it always > > fails after trying to update ferret, which has a windows compiled version a > > few versions behind the current native compiled on the fly version. > > What I was wondering, if there could be a option to exclude a gem from > > trying to update, > > > > i.e.; gem update --except ferret > > > > There is no current option for that, however ... > > or, if there can be a command line option to list gems needing to be > > updated, which we can then do individually > > > > gem update --list_outdated --> [out1, out2,..] > > > > This already works. For example: > > gem update rake flexmock > > will update both gems. > > > > -- > -- > -- Jim Weirich jim at weirichhouse.org http://onestepback.org > ----------------------------------------------------------------- > "Beware of bugs in the above code; I have only proved it correct, > not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20061130/1912ac02/attachment.html From jim at weirichhouse.org Thu Nov 30 09:28:13 2006 From: jim at weirichhouse.org (Jim Weirich) Date: Thu, 30 Nov 2006 14:28:13 -0000 (UTC) Subject: [Rubygems-developers] gem update --except ferret In-Reply-To: References: Message-ID: <55698.198.177.158.254.1164896893.squirrel@onestepback.org> Dominic Sisneros said: > Jim, > > Thanks for the reply. > > I haven't really browsed the code but there must be a method that gets an > array of the gems that need to be updated. > Can we have an option or command to just list these gems that need > updating. > > gem outdated => [gem1,gem2,gem3,ferret] > > gem update gem1 gem2 gem3 Interesting. This reminds me of the --dry-run option in Rake that lists the things rake would do if it wasn't in dry run mode. -- -- Jim Weirich jim at weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) From chad at chadfowler.com Thu Nov 30 11:00:39 2006 From: chad at chadfowler.com (Chad Fowler) Date: Thu, 30 Nov 2006 10:00:39 -0600 Subject: [Rubygems-developers] rubygems/open-uri.rb In-Reply-To: References: Message-ID: On 11/30/06, Eric Hodel wrote: > When using rubygems with a program that has (or will) be using the > built-in open-uri, rubygems causes an infinite loop because > Kernel#open is redefined twice. > > I'd like to prevent the namespace collision. > > Is rubygems/open-uri still necessary? What was the issue with the > rubygems open-uri? > > Can we just ditch open-uri and use net/http to keep rubygems working > on older versions? > > -- There was an open-uri bug in an old Ruby distribution. The svn log seems to indicate that it was Ruby 1.8.1: r539 | chadfowler | 2004-09-15 22:31:11 -0500 (Wed, 15 Sep 2004) | 2 lines Added our own copy of open-uri.rb so we could get around bugs in the old one until 1.8.2 of ruby comes out I think we're OK just removing it. If someone's OK running ruby 1.8.1, they're probably OK with running an old RubyGems too :) I've removed it from svn. Chad From chad at chadfowler.com Thu Nov 30 11:05:36 2006 From: chad at chadfowler.com (Chad Fowler) Date: Thu, 30 Nov 2006 10:05:36 -0600 Subject: [Rubygems-developers] Good practices to freeze gems ? (outside rails) In-Reply-To: <4a68b8cf0611300023i14a3d1abj8b9a878e96d48aae@mail.gmail.com> References: <4a68b8cf0611300023i14a3d1abj8b9a878e96d48aae@mail.gmail.com> Message-ID: On 11/30/06, Thibaut Barr?re wrote: > Hi > > I think it's my first post here, so hello! I've been looking for a > rubygems-users list but could not find it - so I'm not sure it's appropriate > to post that kind of questions here... > > I'm working with some ruby scripts stored under subversion. Some of those > scripts requires gems (like the builder gem for instance, or activerecord). > I'd like to avoid to have to run 'gem install builder' on each developer > machine, in order to rely solely on what is in subversion. > > For that purpose I've unpacked the required gems in a version-controlled > folder. > > Is there a preferred way of telling the gems loader to include all the > unpacked gems available in this folder ? (while keeping the "require > 'builder'" statement working ?) > > best regards and thanks for rubygems! > > Thibaut Barr?re Hi! Now that you've unpacked the gem, using it is no longer a gem-specific task. You just need to add each gem's lib directory (or equivalent) to Ruby's load path. What I would do is to loop through the directory in which you unpacked each gem, and unshift that directory's lib subdirectory onto the $: object (somewhere before you try to use the library). Chad From chad at chadfowler.com Thu Nov 30 13:34:21 2006 From: chad at chadfowler.com (Chad Fowler) Date: Thu, 30 Nov 2006 12:34:21 -0600 Subject: [Rubygems-developers] Enhancement Proposal: Would like be able to programatically specify platform In-Reply-To: <01C905AA-0D98-4346-B444-7A68EDE44C0C@segment7.net> References: <01C905AA-0D98-4346-B444-7A68EDE44C0C@segment7.net> Message-ID: On 11/29/06, Eric Hodel wrote: > On Nov 29, 2006, at 0504 , Chad Fowler wrote: > > On 11/28/06, Chad Woolley wrote: > >> Anyway, it's almost releasable, except for one hitch: I can't figure > >> out how to programatically specify a platform for multiplatform/ > >> binary > >> gems; I always get prompted with the list of platform/version > >> choices. > > > > Hi. You're right that this is a limitation. Jim and I discussed it > > at length at the recent Rails Edge conference. We have a solution in > > mind, but we haven't started hacking yet. > > Can you discuss details? I'd like the tinderbox to not waste time > and bandwidth attempting to run non-platform gems. (And be capable > of running platform gems.) > > -- > Eric Hodel - drbrain at segment7.net - http://blog.segment7.net > > We talked about several possibilities, but I think what we settled on is having RubyGems look for a list of matching platforms in best-match order. This would mean the client would have a built-in taxonomy of sorts. We would then allow you to override it via the command line or the gemrc. We created this project called tattle (http://rubyforge.org/projects/tattle/) to start collecting info about the install footprint of the Ruby community hoping it would help us create this little taxonomy of platforms. I think we'll be surprised at how many different platform combos we see. Thoughts? Chad From drbrain at segment7.net Thu Nov 30 14:44:36 2006 From: drbrain at segment7.net (Eric Hodel) Date: Thu, 30 Nov 2006 11:44:36 -0800 Subject: [Rubygems-developers] rubygems/open-uri.rb In-Reply-To: References: Message-ID: <5D1236C5-3445-45B0-B12D-AE2345D9ABBD@segment7.net> On Nov 30, 2006, at 0800 , Chad Fowler wrote: > On 11/30/06, Eric Hodel wrote: >> When using rubygems with a program that has (or will) be using the >> built-in open-uri, rubygems causes an infinite loop because >> Kernel#open is redefined twice. >> >> I'd like to prevent the namespace collision. >> >> Is rubygems/open-uri still necessary? What was the issue with the >> rubygems open-uri? > > There was an open-uri bug in an old Ruby distribution. The svn log > seems to indicate that it was Ruby 1.8.1: > > I think we're OK just removing it. If someone's OK running ruby > 1.8.1, they're probably OK with running an old RubyGems too :) I've > removed it from svn. Great. I removed the reference in Gem::RemoteFetcher too. -- Eric Hodel - drbrain at segment7.net - http://blog.segment7.net I LIT YOUR GEM ON FIRE! From drbrain at segment7.net Thu Nov 30 14:45:59 2006 From: drbrain at segment7.net (Eric Hodel) Date: Thu, 30 Nov 2006 11:45:59 -0800 Subject: [Rubygems-developers] Good practices to freeze gems ? (outside rails) In-Reply-To: References: <4a68b8cf0611300023i14a3d1abj8b9a878e96d48aae@mail.gmail.com> Message-ID: <9D66D500-BB41-4D66-84A5-9E1CFBC5B78C@segment7.net> On Nov 30, 2006, at 0805 , Chad Fowler wrote: > On 11/30/06, Thibaut Barr?re wrote: >> I'm working with some ruby scripts stored under subversion. Some >> of those >> scripts requires gems (like the builder gem for instance, or >> activerecord). >> I'd like to avoid to have to run 'gem install builder' on each >> developer >> machine, in order to rely solely on what is in subversion. >> >> For that purpose I've unpacked the required gems in a version- >> controlled >> folder. >> >> Is there a preferred way of telling the gems loader to include all >> the >> unpacked gems available in this folder ? (while keeping the "require >> 'builder'" statement working ?) > > Now that you've unpacked the gem, using it is no longer a gem-specific > task. You just need to add each gem's lib directory (or equivalent) > to Ruby's load path. What I would do is to loop through the directory > in which you unpacked each gem, and unshift that directory's lib > subdirectory onto the $: object (somewhere before you try to use the > library). Also, you can set the RUBYLIB environment variable. -- Eric Hodel - drbrain at segment7.net - http://blog.segment7.net I LIT YOUR GEM ON FIRE! From thewoolleyman at gmail.com Thu Nov 30 15:42:56 2006 From: thewoolleyman at gmail.com (Chad Woolley) Date: Thu, 30 Nov 2006 13:42:56 -0700 Subject: [Rubygems-developers] Enhancement Proposal: Would like be able to programatically specify platform In-Reply-To: References: <01C905AA-0D98-4346-B444-7A68EDE44C0C@segment7.net> Message-ID: Do you mean that it would automatically install based on detecting the platform, unless the user overrides it? This seems slightly dangerous, because there's the potential of having the wrong gem installed. On a related note, I think that the supported platforms are currently hardcoded as constants. This may not scale in the future. For example, I can imagine different gems for Win XP vs. Vista, or 32 bit vs 64 bit. Should the supported platforms be hardcoded, or should the gem owner be able to select any arbitrary string for the platform? -- Chad W. On 11/30/06, Chad Fowler wrote: > > We talked about several possibilities, but I think what we settled on > is having RubyGems look for a list of matching platforms in best-match > order. This would mean the client would have a built-in taxonomy of > sorts. We would then allow you to override it via the command line or > the gemrc. > > Thoughts? > > Chad From drbrain at segment7.net Thu Nov 30 20:32:44 2006 From: drbrain at segment7.net (Eric Hodel) Date: Thu, 30 Nov 2006 17:32:44 -0800 Subject: [Rubygems-developers] Enhancement Proposal: Would like be able to programatically specify platform In-Reply-To: References: <01C905AA-0D98-4346-B444-7A68EDE44C0C@segment7.net> Message-ID: On Nov 30, 2006, at 1034 , Chad Fowler wrote: > On 11/29/06, Eric Hodel wrote: >> On Nov 29, 2006, at 0504 , Chad Fowler wrote: >>> On 11/28/06, Chad Woolley wrote: >>>> Anyway, it's almost releasable, except for one hitch: I can't >>>> figure >>>> out how to programatically specify a platform for multiplatform/ >>>> binary >>>> gems; I always get prompted with the list of platform/version >>>> choices. >>> >>> Hi. You're right that this is a limitation. Jim and I discussed it >>> at length at the recent Rails Edge conference. We have a >>> solution in >>> mind, but we haven't started hacking yet. >> >> Can you discuss details? I'd like the tinderbox to not waste time >> and bandwidth attempting to run non-platform gems. (And be capable >> of running platform gems.) > > We talked about several possibilities, but I think what we settled on > is having RubyGems look for a list of matching platforms in best-match > order. This would mean the client would have a built-in taxonomy of > sorts. We would then allow you to override it via the command line or > the gemrc. An array of platforms should be good-enough. You can probably even default to (detected_platform, RUBY). > We created this project called tattle > (http://rubyforge.org/projects/tattle/) to start collecting info about > the install footprint of the Ruby community hoping it would help us > create this little taxonomy of platforms. I think we'll be surprised > at how many different platform combos we see. When will tattle be released? -- Eric Hodel - drbrain at segment7.net - http://blog.segment7.net I LIT YOUR GEM ON FIRE! From drbrain at segment7.net Thu Nov 30 20:55:01 2006 From: drbrain at segment7.net (Eric Hodel) Date: Thu, 30 Nov 2006 17:55:01 -0800 Subject: [Rubygems-developers] Enhancement Proposal: Would like be able to programatically specify platform In-Reply-To: References: <01C905AA-0D98-4346-B444-7A68EDE44C0C@segment7.net> Message-ID: <39831D2C-003F-47A4-B8EA-B6270121BD56@segment7.net> On Nov 30, 2006, at 1242 , Chad Woolley wrote: > On 11/30/06, Chad Fowler wrote: >> >> We talked about several possibilities, but I think what we settled on >> is having RubyGems look for a list of matching platforms in best- >> match >> order. This would mean the client would have a built-in taxonomy of >> sorts. We would then allow you to override it via the command >> line or >> the gemrc. >> >> Thoughts? > > Do you mean that it would automatically install based on detecting the > platform, unless the user overrides it? This seems slightly > dangerous, because there's the potential of having the wrong gem > installed. How so? If they need the win32-mswin version then it is easier to detect the platform in code from Config::CONFIG than it is for the user to have to remember (or guess) if they are using ruby built with the mswin, cygwin or msys compiler (or whatever they are). After all, this is what computers are for. > On a related note, I think that the supported platforms are currently > hardcoded as constants. This may not scale in the future. For > example, I can imagine different gems for Win XP vs. Vista, or 32 bit > vs 64 bit. Should the supported platforms be hardcoded, or should the > gem owner be able to select any arbitrary string for the platform? New operating systems don't pop up every day. I think we can release a new version of rubygems (or a separate platforms gem, like the sources gem) easily enough. Having written a program to go through the specifications of all the current gems, there's a lot of crap in there. Allowing users to arbitrarily specify something will result in no less than 3 strings that mean the same thing with at least one string specifying two different things. -- Eric Hodel - drbrain at segment7.net - http://blog.segment7.net A: Yes Q: Is top-posting bad? ? Derek Milhous Zumsteg From thewoolleyman at gmail.com Thu Nov 30 22:39:50 2006 From: thewoolleyman at gmail.com (Chad Woolley) Date: Thu, 30 Nov 2006 20:39:50 -0700 Subject: [Rubygems-developers] Enhancement Proposal: Would like be able to programatically specify platform In-Reply-To: <39831D2C-003F-47A4-B8EA-B6270121BD56@segment7.net> References: <01C905AA-0D98-4346-B444-7A68EDE44C0C@segment7.net> <39831D2C-003F-47A4-B8EA-B6270121BD56@segment7.net> Message-ID: On 11/30/06, Eric Hodel wrote: > On Nov 30, 2006, at 1242 , Chad Woolley wrote: > > On 11/30/06, Chad Fowler wrote: > > Do you mean that it would automatically install based on detecting the > > platform, unless the user overrides it? This seems slightly > > dangerous, because there's the potential of having the wrong gem > > installed. > > How so? If they need the win32-mswin version then it is easier to > detect the platform in code from Config::CONFIG than it is for the > user to have to remember (or guess) if they are using ruby built with > the mswin, cygwin or msys compiler (or whatever they are). After > all, this is what computers are for. > > > On a related note, I think that the supported platforms are currently > > hardcoded as constants. This may not scale in the future. For > > example, I can imagine different gems for Win XP vs. Vista, or 32 bit > > vs 64 bit. Should the supported platforms be hardcoded, or should the > > gem owner be able to select any arbitrary string for the platform? > > New operating systems don't pop up every day. I think we can release > a new version of rubygems (or a separate platforms gem, like the > sources gem) easily enough. > > Having written a program to go through the specifications of all the > current gems, there's a lot of crap in there. Allowing users to > arbitrarily specify something will result in no less than 3 strings > that mean the same thing with at least one string specifying two > different things. OK, this all makes sense. Thanks for helping me think about the problem in the correct way. > > A: Yes > Q: Is top-posting bad? > ? Derek Milhous Zumsteg I acutally noticed you guys were bottom-posting, and still top-posted anyway. Sorry. "Bad" is a subjective matter of preference. I personally have no problem following top-posted threads, and actually prefer them. I also use Gmail, which shows the first few words of the email body in the preview pane, without having to open the email. Top posting works well with this feature. If it really bothers anyone, I can bottom post. -- Chad W