Error trying to open console login page #2

Closed
ekarlso opened this Issue Jun 5, 2012 · 13 comments

Comments

Projects
None yet
7 participants

ekarlso commented Jun 5, 2012

SystemStackError in Sessions#new

Showing /root/src/cf-console/app/views/layouts/_head.html.haml where line # raised:

stack level too deep
(in /root/src/cf-console/app/assets/stylesheets/chosen.scss)
Extracted source (around line #):

Trace of template inclusion: app/views/layouts/application.html.haml

Rails.root: /root/src/cf-console

Application Trace | Framework Trace | Full Trace
Request

Parameters:

{"locale"=>"en"}
Show session dump

Show env dump

Response

Headers:

None

Owner

frodenas commented Jun 27, 2012

Which version of Rails are you using? I've only tested it with Rails 3.2.2.

vynull commented Jul 31, 2012

I have got the same problem!

This is my gems:

root@lucid02:~/cf-console# bundle show
Gems included by the bundle:

  • actionmailer (3.2.2)
  • actionpack (3.2.2)
  • activemodel (3.2.2)
  • activerecord (3.2.2)
  • activeresource (3.2.2)
  • activesupport (3.2.2)
  • addressable (2.2.8)
  • arel (3.0.2)
  • builder (3.0.0)
  • bundler (1.1.3)
  • chunky_png (1.2.5)
  • cloudfoundry-client (0.2.0)
  • coderay (1.0.7)
  • configatron (2.9.1)
  • cookiejar (0.3.0)
  • crack (0.3.1)
  • daemons (1.1.8)
  • diff-lcs (1.1.3)
  • em-http-request (1.0.2)
  • em-socksify (0.2.0)
  • em-synchrony (1.0.2)
  • erubis (2.7.0)
  • eventmachine (1.0.0.rc.4)
  • execjs (1.4.0)
  • faraday (0.8.1)
  • haml (3.1.6)
  • hike (1.2.1)
  • http_parser.rb (0.5.3)
  • i18n (0.6.0)
  • i18n-js (2.1.2)
  • journey (1.0.4)
  • json (1.7.4)
  • json_pure (1.7.4)
  • mail (2.4.4)
  • mime-types (1.19)
  • multi_json (1.3.6)
  • multipart-post (1.1.5)
  • polyglot (0.3.3)
  • rack (1.4.1)
  • rack-cache (1.2)
  • rack-fiber_pool (0.9.2)
  • rack-ssl (1.3.2)
  • rack-test (0.6.1)
  • rails (3.2.2)
  • railties (3.2.2)
  • rake (0.9.2.2)
  • rdoc (3.12)
  • routing-filter (0.3.1)
  • rspec (2.8.0)
  • rspec-core (2.8.0)
  • rspec-expectations (2.8.0)
  • rspec-mocks (2.8.0)
  • rspec-rails (2.8.1)
  • rubyzip (0.9.6.1)
  • sass (3.1.20)
  • sass-rails (3.2.5)
  • sprite-factory (1.5.1)
  • sprockets (2.1.3)
  • thin (1.3.1)
  • thor (0.14.6)
  • tilt (1.3.3)
  • treetop (1.4.10)
  • tzinfo (0.3.33)
  • uglifier (1.2.6)
  • vcr (2.0.1)
  • webmock (1.8.8)
  • yamler (0.1.0)

I'm having the same problem with Rails 3.2.2 and Ruby 1.9.2

same error is happening in my local environment ... windows + ruby 1.9.3 + rails 3.2.7

Owner

frodenas commented Aug 6, 2012

Try precompiling the assets -> bundle exec rake assets:precompile

Thanks for the quick reply... precompiled the assets as you suggested.. but still getting error .. here is what I saw in the log file


Started GET "/" for 127.0.0.1 at 2012-08-06 14:34:51 -0700
Processing by DashboardController#index as HTML
Redirected to http://localhost:3000/en/login
Filter chain halted as :require_login rendered or redirected
Completed 302 Found in 5280ms

Started GET "/en/login" for 127.0.0.1 at 2012-08-06 14:34:57 -0700
Processing by SessionsController#new as HTML
Parameters: {"locale"=>"en"}
Rendered sessions/new.html.haml within layouts/application (13.0ms)
Compiled application-pre.css (25ms) (pid 23268)
Compiled chosen.css (51ms) (pid 23268)
Compiled coderay.css (73ms) (pid 23268)
Compiled flags.css (32ms) (pid 23268)
Compiled vendor_images.css (22ms) (pid 23268)
Compiled application-media.css (4ms) (pid 23268)
Compiled application-post.css (14ms) (pid 23268)
Compiled application.css (785ms) (pid 23268)
Compiled modernizr.js (0ms) (pid 23268)
Rendered layouts/_head.html.haml (1537.2ms)
Rendered layouts/_forkapp.html.haml (1.0ms)
Rendered layouts/_menu.html.haml (2.0ms)
Rendered layouts/_flashes.html.haml (3.0ms)
Rendered layouts/_footer.html.haml (2.0ms)
Compiled rails.js (0ms) (pid 23268)
Compiled plugins.js (1ms) (pid 23268)
Compiled jquery.dataTables.min.js (2ms) (pid 23268)
Compiled jquery.dataTables.languages.js (0ms) (pid 23268)
Compiled jquery.jeditable.mini.js (1ms) (pid 23268)
Compiled chosen.jquery.min.js (1ms) (pid 23268)
Compiled excanvas.min.js (0ms) (pid 23268)
Compiled jquery.flot.min.js (1ms) (pid 23268)
Compiled jquery.flot.pie.min.js (0ms) (pid 23268)
Compiled jquery.tools.custom.js (0ms) (pid 23268)
Compiled i18n.js (1ms) (pid 23268)
Rendered layouts/_javascripts.html.haml (666.1ms)
Completed 500 Internal Server Error in 2257ms

ActionView::Template::Error (invalid byte sequence in US-ASCII
(in c:/work-win/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/i18n-js-2.1.2/vendor/assets/javascripts/i18n/translations.js.erb)):
9: dataTables_lang = dataTables_lang_#{I18n.locale};
10: validatorTools_lang = '#{I18n.locale}';
11: });
12: = javascript_include_tag "application"
13:
14: = yield :javascripts
app/views/layouts/_javascripts.html.haml:12:in _app_views_layouts__javascripts_html_haml__609394644_34340748' app/views/layouts/application.html.haml:25:in_app_views_layouts_application_html_haml___99792850_31813356'

Rendered c:/work-win/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_dispatch/middleware/templates/rescues/_trace.erb (5.0ms)
Rendered c:/work-win/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.0ms)
Rendered c:/work-win/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/actionpack-3.2.7/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (53.0ms)

Owner

frodenas commented Aug 6, 2012

This is another error, see PR 74 at the i18n-js gem. I'll update the gem soon.

In the meantime, just modify your c:/work-win/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/i18n-js-2.1.2/vendor/assets/javascripts/i18n/translations.js.erb file adding "<%# encoding: utf-8%>" at the first line, like https://github.com/fnando/i18n-js/blob/master/vendor/assets/javascripts/i18n/translations.js.erb

Thank you very much... precompiling the assets and adding the fix for i18n-js solved the issues.... my local environment is up and running :)

Thanks Ferran, also solved the issue in my environment (ruby 1.92 + rails 3.2.2 in Linux)

@frodenas frodenas closed this Oct 15, 2012

I have the same problem before , now i update to the lasted codes(2012/10/15) . and follow Frodenas's sugguestoion precompiled the assets. but the problem still exist.my environment : ruby1.9.2; rails 3.2.8; Windows . I'm looking forward to reply. many thanks!

It is Ok now. maybe it's not complete when excute the precompiled the assets just now. thanks again.

kelby commented Oct 22, 2012

In development model, delete some lines from application.scss, then restart your app.
Repeat this unless the page is ok, after that restoration the codes which you delete.
yes, to the last i don't do anything, but the issue is solve.
PS: cf-console.scfapp.com

Owner

frodenas commented Oct 22, 2012

Problem is Ruby 1.9.* Fibers only have 4Kb of stack space, and sass is consuming all the space. The only way to increase stack size is to recompile Ruby. In Ruby 2.0 this will be addressed allowing to change it dynamically (http://bugs.ruby-lang.org/issues/3187). This app uses Fibers to increase performance. I'll change the behavior to not use fiber by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment