Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Asset Pipeline + Stack Level to Deep

yozlinden edited this page · 3 revisions
Clone this wiki locally

If you’re plagued by “SystemStackError: stack level too deep”:

  1. Disable assets pipline(`config.assets.enabled = false`) in application.rb.
  2. Don’t require `sass-rails` but instead require `sass` in Gemfile.

application.html.erb

<link href="/assets/application.css" media="screen" rel="stylesheet" type="text/css" />
<script src="/assets/application.js" type="text/javascript"></script>

config.ru

require ::File.expand_path('../config/environment',  __FILE__)

builder = Rack::Builder.new do
  map '/assets' do
    environment = Sprockets::Environment.new
    environment.append_path 'app/assets/javascripts'
    environment.append_path 'app/assets/stylesheets'
    run environment
  end

  map '/' do
    use Rack::FiberPool, :size => 6
    run YourApp::Application
  end
end

run builder
Something went wrong with that request. Please try again.