Hi, I was wondering if there is any of getting the gem package provider to run non-interactively? When upgrading mongrel it fails because it gets prompted for which version to install: Attempting remote update of mongrel Select which gem to install for your platform (x86_64-linux) 1. mongrel 1.1.1 (ruby) 2. mongrel 1.1.1 (jruby) 3. mongrel 1.1.1 (mswin32) 4. mongrel 1.1 (mswin32) 5. mongrel 1.1 (ruby) 6. mongrel 1.1 (jruby) 7. Skip this gem 8. Cancel installation > Ideally I would get it to always choose option 1. thanks, Iain. -- Iain Pople Systems Interface Technical Lead University of Melbourne
On Thu, Nov 29, 2007 at 05:14:27PM +1100, Iain Pople wrote:> I was wondering if there is any of getting the gem package provider to > run non-interactively?[snip] Does this still happen with RubyGems 0.9.5? -- Jos Backus jos at catnook.com
On 11/28/07, Jos Backus <jos@catnook.com> wrote:> On Thu, Nov 29, 2007 at 05:14:27PM +1100, Iain Pople wrote: > > I was wondering if there is any of getting the gem package provider to > > run non-interactively? > [snip] > > Does this still happen with RubyGems 0.9.5?Yes. In fact, one workaround to this problem was to build a custom gem repository with only one platforms gems... that worked with 0.9.4, but doesn''t work in 0.9.5 (it''s smart enough to know you *might*, *maybe*, have another platforms gems floating around someplace.) The ChangeLog has: * lib/rubygems/commands/dependency_command.rb: Add --platform. But we haven''t seen a RubyGems release with it yet. I''m hopeful that we''ll be able to do: gem install mongrel --version 1.0.1 --platform ruby Which would let this always be non-interactive. Adam -- HJK Solutions - We Launch Startups - http://www.hjksolutions.com Adam Jacob, Senior Partner T: (206) 508-4759 E: adam@hjksolutions.com
On Thu, Nov 29, 2007 at 10:11:14AM -0800, Adam Jacob wrote:> On 11/28/07, Jos Backus <jos@catnook.com> wrote: > > On Thu, Nov 29, 2007 at 05:14:27PM +1100, Iain Pople wrote: > > > I was wondering if there is any of getting the gem package provider to > > > run non-interactively? > > [snip] > > > > Does this still happen with RubyGems 0.9.5? > > Yes. In fact, one workaround to this problem was to build a custom > gem repository with only one platforms gems... that worked with 0.9.4, > but doesn''t work in 0.9.5 (it''s smart enough to know you *might*, > *maybe*, have another platforms gems floating around someplace.) > > The ChangeLog has: > > * lib/rubygems/commands/dependency_command.rb: Add --platform. > > But we haven''t seen a RubyGems release with it yet. I''m hopeful that > we''ll be able to do: > > gem install mongrel --version 1.0.1 --platform rubyInteresting. The change you allude to was added in October and is present in RubyGems 0.9.5 (see r1425), so I''m not sure what you mean by `But we haven''t seen a RubyGems release with it yet.''? 2007-10-02 Eric Hodel <drbrain@segment7.net> * lib/rubygems/source_index.rb: Make #outdated search only for gems matching the current platform. * lib/rubygems/commands/dependency_command.rb: Add --platform. * lib/rubygems/commands/outdated_command.rb: Ditto. * lib/rubygems/commands/specification_command.rb: Ditto. * lib/rubygems/commands/update_command.rb: Ditto. Maybe something is missing still for full platform selection support, in which case filing a bug would be good. -- Jos Backus jos at catnook.com