Open jasonrobertfox opened 11 years ago
I'm getting the same error. My app structure is:
/
/config.ru
/app/
/app/app.rb
/app/assets/
/app/assets/css/
/app/assets/css/style.sass
/app/assets/js/
/app/assets/js/app.js
And I'm setting it up like so:
assets do
js_compression :jsmin
css_compression :simple
serve '/js', :from => 'app/assets/js'
serve '/css', :from => 'app/assets/css'
js :app, [
'//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js',
'//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js',
'/js/app.js',
]
css :style, [
# Bootstrap
'//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css',
# Fonts
'//fonts.googleapis.com/css?family=Roboto:400,500,700,900,300,100',
'//fonts.googleapis.com/css?family=Source+Code+Pro:200,300,400,500,600,700,900',
'//fonts.googleapis.com/css?family=Warnes',
# Style
'/css/style.css',
]
end
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've just had the same problem: it happens when in the js :app
or css :style
param array you reference a file that does not exist.
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!