You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought I'd be clever and include the Zurb Foundation javascript files in my asset pipeline with this:
serve '/foundation', from: Foundation.js_path
And this works well in development, however when I set the environment to production I get this stack trace:
ArgumentError - comparison of NilClass with String failed:
/Users/jfox/.rvm/gems/ruby-2.0.0-p247@sinatra-boilerplate/gems/sinatra-assetpack-0.3.1/lib/sinatra/assetpack/buster_helpers.rb:7:in `sort'
/Users/jfox/.rvm/gems/ruby-2.0.0-p247@sinatra-boilerplate/gems/sinatra-assetpack-0.3.1/lib/sinatra/assetpack/buster_helpers.rb:7:in `cache_buster_hash'
/Users/jfox/.rvm/gems/ruby-2.0.0-p247@sinatra-boilerplate/gems/sinatra-assetpack-0.3.1/lib/sinatra/assetpack/buster_helpers.rb:28:in `add_cache_buster'
/Users/jfox/.rvm/gems/ruby-2.0.0-p247@sinatra-boilerplate/gems/sinatra-assetpack-0.3.1/lib/sinatra/assetpack/package.rb:73:in `production_path'
/Users/jfox/.rvm/gems/ruby-2.0.0-p247@sinatra-boilerplate/gems/sinatra-assetpack-0.3.1/lib/sinatra/assetpack/package.rb:77:in `to_production_html'
/Users/jfox/.rvm/gems/ruby-2.0.0-p247@sinatra-boilerplate/gems/sinatra-assetpack-0.3.1/lib/sinatra/assetpack/helpers.rb:37:in `show_one_asset_pack'
/Users/jfox/.rvm/gems/ruby-2.0.0-p247@sinatra-boilerplate/gems/sinatra-assetpack-0.3.1/lib/sinatra/assetpack/helpers.rb:28:in `block in show_asset_pack'
/Users/jfox/.rvm/gems/ruby-2.0.0-p247@sinatra-boilerplate/gems/sinatra-assetpack-0.3.1/lib/sinatra/assetpack/helpers.rb:27:in `map'
/Users/jfox/.rvm/gems/ruby-2.0.0-p247@sinatra-boilerplate/gems/sinatra-assetpack-0.3.1/lib/sinatra/assetpack/helpers.rb:27:in `show_asset_pack'
...
It does not seem to like trying to serve the files from outside the app root. Is there a way to serve files directly from included gems? It seems duplicative to have to copy the zurb javascript while I can just import the scss files.
Thanks!
The text was updated successfully, but these errors were encountered:
The error is thrown if I run the app in PRODUCTION mode only. It seems to be triggered by /js/app.js and /css/style.css. When I remove those lines from AssetPack configuration, the error dissapears.
I thought I'd be clever and include the Zurb Foundation javascript files in my asset pipeline with this:
And this works well in development, however when I set the environment to
production
I get this stack trace:It does not seem to like trying to serve the files from outside the app root. Is there a way to serve files directly from included gems? It seems duplicative to have to copy the zurb javascript while I can just import the scss files.
Thanks!
The text was updated successfully, but these errors were encountered: