Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Fixing NameError with Sprockets #1

merged 1 commit into from

2 participants

Garrett Murphey Andrew Marshall
Garrett Murphey

Following the instructions in the readme, I get a NameError when registering Sinatra::Sprockets from the following line in sinatra/sprockets.rb:

 @environment = app.root

Fixed this by requiring Sprockets.

Andrew Marshall

Thanks for the patch! I had sprockets manually in my app's gemfile, which meant it was always already required, feel rather silly about this.

Andrew Marshall amarshall merged commit fe7b94f into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 27, 2012
  1. Garrett Murphey
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/sinatra/sprockets.rb
1  lib/sinatra/sprockets.rb
@@ -1,3 +1,4 @@
+require "sprockets"
require "sinatra/sprockets/version"
require "sinatra/sprockets/asset_paths"
require "sinatra/sprockets/configuration"
Something went wrong with that request. Please try again.