No it is not. I managed to get the issue reproduced in a very tiny
application using Rails 2.2.2.
The code is available at
git://github.com/kennethkalmer/rails-broken-gems-example.git and shows
exactly how to simulate the breakage mentioned by Steven. Please
review the README file
(http://github.com/kennethkalmer/rails-broken-gems-example/tree/master)
for a complete breakdown of the issue and how to fix it.
In a nutshell, it boils down to the one-line patch below:
--- a/vendor/rails/railties/lib/initializer.rb
+++ b/vendor/rails/railties/lib/initializer.rb
@@ -284,7 +284,7 @@ module Rails
def check_gem_dependencies
unloaded_gems = @configuration.gems.reject { |g| g.loaded? }
if unloaded_gems.size > 0
- @gems_dependencies_loaded = false
+ @gems_dependencies_loaded = false || $rails_gem_installer
# don't print if the gems rake tasks are being run
unless $rails_gem_installer
abort <<-end_error
Any feedback would be appreciated, including pointers to the correct
Lighthouse tickets for making my case.
Best
--
Kenneth Kalmer
kenneth...@gmail.com
http://opensourcery.co.za
Seems I was in a too big a hurry, this does solve the initial issue
but creates a new one upon running 'rake gems', which now complains
about the gem specifications...
I'll investigate and report my findings.
What's the error about the specifications?
--Matt
On Nov 24, 2008, at 11:00 AM, Kenneth Kalmer wrote:
>
> On Mon, Nov 24, 2008 at 5:05 PM, Kenneth Kalmer
> <kenneth...@gmail.com> wrote:
>> On Mon, Nov 24, 2008 at 2:38 PM, Kenneth Kalmer>
>>
This is a chicken and egg scenario, no wonder it is such hot topic.
Good point, didn't consider that since I was hunting the bug in
extreme anger.
> FWIW, this problem goes away on edge - http://github.com/rails/rails/commit/a026b4c983681b71d876ea37958c3e5bc605acac
> avoids preloading ApplicationController, and thus solves this. (I
> tested it...)
Nice, will have a look too.
> What's the error about the specifications?
$ rake gems
(in /home/kenneth/work/tmp/rails-broken-gems-example)
- [I] settingslogic
rake aborted!
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.dependencies
vendor/rails/railties/lib/rails/gem_dependency.rb:77:in `dependencies'
all_dependencies = specification.dependencies.map do |dependency|
GemDependency.new(dependency.name, :requirement =>
dependency.version_requirements)
end
Thanks for digging into this with me.
Nice, will have a look too.What's the error about the specifications?
$ rake gems
(in /home/kenneth/work/tmp/rails-broken-gems-example)
- [I] settingslogic
rake aborted!
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.dependencies
vendor/rails/railties/lib/rails/gem_dependency.rb:77:in `dependencies'
all_dependencies = specification.dependencies.map do |dependency|
GemDependency.new(dependency.name, :requirement =>
dependency.version_requirements)
end
On Tue, Nov 25, 2008 at 7:38 AM, Matt Jones <al2...@gmail.com> wrote:
> Patch is on lighthouse and includes a test for this case:
> http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1464
>
> (patch against 2-2-stable branch)
>
> --Matt Jones
--
Thanks everyone
On Mon, Dec 1, 2008 at 9:46 PM, Michael Koziarski <mic...@koziarski.com> wrote:
>
> Applied to master and 2-2 stable. Are there any other pending gems
> changes we should investigate before we cut a 2.2 point release to
> address
>
> On Wed, Nov 26, 2008 at 6:46 AM, Kenneth Kalmer
> <kenneth...@gmail.com> wrote:
> >
> > Thanks Matt, applied to the broken app example and it worked
> > perfectly. Also commented on the ticket.
> >
> > On Tue, Nov 25, 2008 at 7:38 AM, Matt Jones <al2...@gmail.com> wrote:
> >> Patch is on lighthouse and includes a test for this case:
> >> http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1464
> >>
> >> (patch against 2-2-stable branch)
> >>
--