Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Console loading is broken on recursive module

#706

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

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 ?

Regards,

Reported by coren · July 25th, 2008 @ 04:28 PM

State: invalid
Milestone: 2.x
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Ramon Salvadó
  2. Tristan Leo
  3. Pratik
    Pratik
    • State changed from new to invalid
    • Assigned user set to Pratik

    I'm not able to reproduce this. Could you please add steps to reproduce on a new rails app ?

    Thanks.

    August 22nd, 2008 @ 02:53 AM

  4. coren
    coren

    Hi,

    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 "

    August 22nd, 2008 @ 09:08 AM

  5. coren
    coren

    Hi,

    Another try where I hope to have a good formatting (there's no preview and no way to edit comments :/):

    Here is a sample step to reproduce : 1. make a rails app 1. * rails test 2. Install gem gettext 2. * sudo gem install gettext 3. Add it to your new app, in config/environment.rb : 3. * config.gem "gettext", :lib => "gettext/rails" 4. Install gettext_localize plugin 4. * script/plugin install svn://rubyforge.org/var/svn/gettextlocalize/trunk/gettext_localize 5. Launch the console 5. * ./script/console 6. you will see the ugly error this issue & the fix is about : 6. * "/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 "

    August 22nd, 2008 @ 09:11 AM

  6. coren
    coren

    Hi,

    Last try :

    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 "
    

    August 22nd, 2008 @ 09:14 AM

  7. coren
    coren

    It seems I've managed to have something working.

    -> Pratik: Would you please test try the steps and update this issue accordingly ?

    Thanks,

    August 22nd, 2008 @ 09:16 AM

  8. Jorge Calás
    Jorge Calás

    I have the same problem.

    August 22nd, 2008 @ 01:01 PM

  9. Eduardo
    Eduardo
    • Tag changed from bug, helper, patch, railties to bug, helper, patch, railties

    Same thing here. Anybody knows how to make the bug valid again? I guess nobody will be following an invalid bug.

    September 21st, 2008 @ 05:02 PM

  10. coren
    coren

    I am the author of the bug, but I cannot change it to valid again :/. Maybe I should open a new one ?

    September 22nd, 2008 @ 12:51 PM

  11. Eduardo
    Eduardo

    Yes, good idea. You can mention the original bug and the inability to make it valid again. Please post here the new bug number for the other people with the same problem. And thanks for the original report!

    By the way, I think that even without changing environment.rb you get the error. I had to move the whole plugin out of the way to be able to use the console.

    September 22nd, 2008 @ 01:19 PM

  12. coren
    coren

    Hi, The new bug is #1103 coren Console loading is broken on recursive module. You can comment and see what's happening on this new issue. You can consider this one as closed.

    Regards,

    September 24th, 2008 @ 03:40 PM

  13. Ryan Bigg
    Ryan Bigg
    • Tag cleared.

    Automatic cleanup of spam.

    November 8th, 2010 @ 01:51 AM