On Tue, Feb 23, 2010 at 7:32 PM, Jeremy Hinegardner <jeremy@hinegardner.org> wrote:
On Tue, Feb 23, 2010 at 05:23:08PM -0500, Jason Guiditta wrote:
> On Tue, Feb 23, 2010 at 5:17 PM, Jeroen van Meeuwen <kanarip@kanarip.com>wrote:
>
> >
> > On Tue, 23 Feb 2010 16:47:33 -0500, Jason Guiditta
> > <jason.guiditta@gmail.com> wrote:
> > > I am running Fedora 12 with Rails 2.3.4 installed.  Everything was
> > working
> > > fine, then last night I got an update from yum for Rack 1.1.  After
> > > installing that, my working rails apps failed to load.  Creating a new
> > test
> > > app yielded:
> > > /usr/lib/ruby/site_ruby/1.8/rubygems.rb:827:in `report_activate_error':
> > > RubyGem version error: rack(1.1.0 not ~> 1.0.0) (Gem::LoadError)
> > >
> > > Has anyone else hit this issue?  If more detail is needed, let me know.
> > >  Thanks,
> > >
> >
> > I've seen this issue occur once or twice, but I'm not all too well versed
> > in Ruby... is ~> even a valid comparison and if so, what does it imply
> > exactly? I'm afraid this should have been '=>', which would require a patch
> > on the rails stack.
> >
> > -- Jeroen
> >
> >
> Good call, '=~' is valid, but '~>' does not appear to be, according to the
> list here:
> http://www.ruby-doc.org/docs/ProgrammingRuby/language.html#table_18.4

~> is a valid comparison for ruby gem versions.  It is not a language
operator.

If you look at the gem specification in one of your gems, you'll see
something like "rack ~> 1.0.0".  Which means that all rack versions of
the form 1.0.X, where X > 0 will satisfy that dependency.

if the dependency was "rack ~> 1.0" then anything of the version 1.X would
satisfy the dependency.

When you updated from rack 1.0 to rack 1.1, you had a had some other gem
that was dependent on "rack ~> 1.0.0" and when you upgraded to rack 1.1
via rpm, then it uninstalled rack 1.0, which broke that gem dependency.

If you run 'gem dependency' it will print out the dependency tree of
your gems and you can see which gem depends on 'rack ~> 1.0.0'

enjoy,

-jeremy

--
========================================================================
 Jeremy Hinegardner                              jeremy@hinegardner.org


Based on this, the culprit appears to be actionpack:

 Gem actionpack-2.3.4
  activesupport (= 2.3.4, runtime)
  rack (~> 1.0.0, runtime)


This appears to be the only one in the list of gem dependencies that has rack ~>1.0.0.  I'll look into this more in the morning, but it is definitely in the gemspec, so not sure the best route to fix this on fedora:
/usr/lib/ruby/gems/1.8/specifications/actionpack-2.3.4.gemspec 
s.add_dependency(%q<rack>, ["~> 1.0.0"])