This project is archived and is in readonly mode.

#706 ✓invalid
coren

Console loading is broken on recursive module

Reported by coren | July 25th, 2008 @ 04:28 PM | in 2.x

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,

Comments and changes to this ticket

  • Ramon Salvadó
  • Tristan Leo
  • Pratik

    Pratik August 22nd, 2008 @ 02:53 AM

    • 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.

  • coren

    coren August 22nd, 2008 @ 09:08 AM

    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 "

  • coren

    coren August 22nd, 2008 @ 09:11 AM

    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 "

  • coren

    coren August 22nd, 2008 @ 09:14 AM

    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 "
    
  • coren

    coren August 22nd, 2008 @ 09:16 AM

    It seems I've managed to have something working.

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

    Thanks,

  • Jorge Calás

    Jorge Calás August 22nd, 2008 @ 01:01 PM

    I have the same problem.

  • Eduardo

    Eduardo September 21st, 2008 @ 05:02 PM

    • 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.

  • coren

    coren September 22nd, 2008 @ 12:51 PM

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

  • Eduardo

    Eduardo September 22nd, 2008 @ 01:19 PM

    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.

  • coren

    coren September 24th, 2008 @ 03:40 PM

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

    Regards,

  • Ryan Bigg

    Ryan Bigg November 8th, 2010 @ 01:51 AM

    • Tag cleared.

    Automatic cleanup of spam.

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