Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with find_assets on staging #101

Closed
Chocksy opened this issue Mar 3, 2016 · 0 comments
Closed

Fix issue with find_assets on staging #101

Chocksy opened this issue Mar 3, 2016 · 0 comments
Assignees

Comments

@Chocksy
Copy link
Member

Chocksy commented Mar 3, 2016

Sprockets 3 changed the way it works so now our find_assets line in application.html doesn't work in production because it returns nil. We could turn compile on on staging/prod but that's not ideal as it will compile assets each time or we can find another way to access the assets and check if the js file exists.

2016-03-03T09:12:20.814810+00:00 app[web.1]: App 138 stdout: ActionView::Template::Error (undefined method `find_asset' for nil:NilClass):
2016-03-03T09:12:20.814829+00:00 app[web.1]: App 138 stdout:     14:   %body{:id=>"#{controller.controller_name}-#{controller.action_name}"}
2016-03-03T09:12:20.814848+00:00 app[web.1]: App 138 stdout:     15:     = yield
2016-03-03T09:12:20.814887+00:00 app[web.1]: App 138 stdout:     16:     = javascript_include_tag 'application', 'data-turbolinks-eval' => false
2016-03-03T09:12:20.814906+00:00 app[web.1]: App 138 stdout:     17:     - if Rails.application.assets.find_asset("pages/#{controller.controller_name}")
2016-03-03T09:12:20.814932+00:00 app[web.1]: App 138 stdout:     18:       = javascript_include_tag "pages/#{controller.controller_name}"
2016-03-03T09:12:20.814967+00:00 app[web.1]: App 138 stdout: 
2016-03-03T09:12:20.814750+00:00 app[web.1]: App 138 stdout: 
2016-03-03T09:12:20.814848+00:00 app[web.1]: App 138 stdout:     15:     = yield
2016-03-03T09:12:20.880840+00:00 app[web.1]: App 159 stdout: 

rails/sprockets-rails#294
mileszs/wicked_pdf#476

@Chocksy Chocksy added the task label Mar 3, 2016
@Chocksy Chocksy added the bug label Mar 3, 2016
@Chocksy Chocksy closed this as completed in f0a4a17 Mar 4, 2016
Chocksy added a commit that referenced this issue Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants