-
Notifications
You must be signed in to change notification settings - Fork 244
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
Fail to run rails app 4.2.5 with sprockets-rails 3.0.0 #291
Comments
Thank you for the issue. The reason that you application is not working may be because it is not ready to sprockets 3 yet, but to be able to help you we need a way to replicate the issue. Could you create a sample application reproducing this error? |
@rafaelfranca What features and requirements must be met? |
@rafaelfranca
|
How can I reproduce it? |
@rafaelfranca In development mode all works, in production - layouts/application.rb
index.html.erb:
|
@rafaelfranca |
@rafaelfranca
application.css
|
@rafaelfranca |
I tried to reproduce it and could not. Could you try to change this application to reproduce it https://github.com/rafaelfranca/test_app? |
@rafaelfranca
|
Could you please fork my application, change it and commit the changes necessary to reproduce the problem? |
@rafaelfranca
rails s
|
@rafaelfranca |
@rafaelfranca
I think it just is interconnected |
Tried everything you said as you can see here rafaelfranca/test_app@e276680 but still didn't reproduced. It is something in your application or some dependency that you use. I can only help if I can reproduce it. I'm closing this issue since I can't reproduce but fell free to comment here with a way to reproduce that I'll reopen |
@rafaelfranca |
Yes. |
Strange! |
@rafaelfranca
It is valid for |
@rafaelfranca |
Please help! Whats may be wrong? |
@rafaelfranca
when running Engine
In development |
In environments/production:
|
@rafaelfranca |
@rafaelfranca
and
Application RUN! |
@rafaelfranca Engine 'Admin' I wrote itself, and I use It as local gem. |
All that is fine with sprockets-rails 3, but I guess you engine has something that has invalid JavaScript. I suggest to you to try to checks all your files in the engine. |
@rafaelfranca |
@rafaelfranca |
sprockets-rails should not cause any JavaScript error because it doesn't handle any JavaScript. Before upgrading to sprockets-rails 3 are you using sprockets 2 or sprockets 3? As it only happen when |
Even if I delete In Engine |
Try to remove ckeditor to see if the error still happen. |
@rafaelfranca I just run 'gem upgrade' and all application was crashed after |
can you check if you application was using |
@rafaelfranca
Errror still present. |
@rafaelfranca |
@rafaelfranca
and in main app config/initializers/assets.rb:
with |
@Sega100500 have you verified that it breaks my application? I'm sorry but I can't do it right now, so it would be awesome if you fork my application do the changes yourself, see if it fails and open a PR to my application. |
@rafaelfranca
In development mode it work. I try to create test Engine. |
When I try to login to the 'Admin' the error log different:
Where TRUE ? |
This Parser error still looks like invalid JavaScript. I can't help more without knowing how to reproduce it. |
@rafaelfranca Question How I set several paths (or parts of path) to EXCLUDDE from precompile? It is possible?
How exclude subdirectories |
Yeah, just don't include them. BTW, |
@rafaelfranca |
It is not. If you want more control I suggest you to use the new manifest feature https://github.com/rails/sprockets/blob/3.x/UPGRADING.md#preference-for-asset-manifest-and-links |
@rafaelfranca |
@rafaelfranca |
@rafaelfranca |
@rafaelfranca |
I know this issue is long closed, but I'm adding a comment for anyone who comes across this down the road (like I did). Applies to If the image assets from your engine are not loading (despite what Rails says about "all non-JS/CSS in app/assets folder are already added"), and you're getting the "Asset was not declared to be precompiled in production" error, you need to add this to initializer 'my_engine.assets.precompile' do |app|
app.config.assets.precompile += %w(my_engine/*.png my_engine/*.gif)
end Or something along those lines, depending on how your image assets are structured. |
anyone can help me for this? |
rails/rails#22661
Ruby 2.2.4
Rails 4.2.5
with sprockets-rails 3.0.0 rails application fail to run
I add in Gemfile:
then ALL WORK!
The text was updated successfully, but these errors were encountered: