rstacruz / sinatra-assetpack

Package your assets transparently in Sinatra.
http://ricostacruz.com/sinatra-assetpack/
MIT License
542 stars 97 forks source link

where does request come from? #193

Open Thermatix opened 9 years ago

Thermatix commented 9 years ago

I keep getting an error when assetpack tries to render out the header lines for getting the asset files.

Specifically:

undefined method 'script_name' for nil:NilClass:

The undefined is a function/variable/somthing called request but I can't find it any where.

So where does request come from?

EDIT: just to add clarification the specific line it errors on is in assetpack/helpers.rb:44

dongyuwei commented 9 years ago
  1. in assetpack/builder.rb , there is a build_get method, which send the request.
  2. in assetpack/class_methods.rb, there is a add_individual_routes method, which add the GET routes for the individual files.