This project is archived and is in readonly mode.

#1103 ✓wontfix
coren

coren Console loading is broken on recursive module

Reported by coren | September 24th, 2008 @ 03:37 PM

Hi, It seems the console loader was somehow broken on some modules. When launching console, the error line : /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/console_with_helpers.rb:8:in include_all_modules_from':SystemStackError: stack level too deep is displayed. The console is launched, but the error is ugly. I have investigated it and found the bug. The console loader can be confused when a module include its parent, like GetText does for Rails. There's something like this in it :


module GetText
  module Rails
    include GetText
    //...
  end
end

Here is a sample step to reproduce :


1. make a rails app
> rails test
2. Install gem gettext
> sudo gem install gettext
3. Add it to your new app, in config/environment.rb :
> config.gem "gettext", :lib => "gettext/rails"
4. Install gettext_localize plugin
>  script/plugin install svn://rubyforge.org/var/svn/gettextlocalize/trunk/gettext_localize
5. Launch the console
>  ./script/console
6. you will see the ugly error this issue & the fix is about :
> "/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/console_with_helpers.rb:5:in include_all_modules_from':SystemStackError: stack level too deep "

The fix is simple and attached to this ticket. I have tried to follow the guidelines about git patch submission. Would you please review and integrate it ?

This request is re-submitted, previous one is #706. I was not able to change it to valid again.

Regards,

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages