-
Notifications
You must be signed in to change notification settings - Fork 117
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
error when running with sprockets-rails 3.0.0 #216
Comments
👍 |
Quick debugging session here pointed to the fact that in engine.rb:14, |
And some more pointed to the new sprockets-rails code that only assigns Also just as an answer to myself: |
Had to restrict sprockets-rails due to a compatibility issue with konacha. Issue reported at jfirebaugh/konacha#216.
Had to restrict sprocket-rails due to a compabitility issue with Konacha 3.7.0. Issue posted on jfirebaugh/konacha#216.
Nokogiri needed to fix a vulnerability. Had to restrict sprocket-rails because konacha has a compatibility issue with it. Issue posted at jfirebaugh/konacha#216.
Nokogiri needed a patch level upgrade to fix a vulnerability issue. Sprockets-rails needed to be restricted due to a Konacha 3.7.0 compatibility issue: jfirebaugh/konacha#216.
See https://github.com/rails/sprockets-rails#initializer-options — you should now use app.config.assets.configure do |env|
env.register_engine ...
end I know that doesn't quite solve the problem but hopefully that sheds a bit of light... |
+1 |
+1 |
The particular commit on sprockets-rails that causes konacha tests to start failing (e.g. bundle exec rake in in git clone of konacha begins to fail after this point) is: Since the description for that commit is "Rails.application.assets is nil when compile=false" it makes sense that it is causing the problems we're all seeing. I have a fork of Konacha (https://github.com/stevenchanin/konacha) with a Gemfile that has the specific refs for the two adjacent commits to rails-sprockets that make Konacha flip from working to breaking. If you edit
I hope this helps correct the issue. |
@stevenchanin Thanks for chipping in! Unfortunately, I don't think this is a viable solution; if I read it correctly, your solution is to depend on an older version of sprockets. The issue at hand, though, is that Sprockets 3.0 introduced a breaking change (not a bug) starting with the commit that you identified, and Konacha needs to be updated to deal with the change. |
@afn - I agree. I think Konacha needs to become compatible with the current sprockets version to be workable. I also agree that the change to |
@stevenchanin @afn @dirkdk could you please check if this works for you: https://github.com/alexkravets/konacha — this fixed the problem for me, but we don't have lot of tests as of now. Will have to fix tests as well. Please run in test environment: |
@alexkravets - when I try your fork, I get mixed results. Executing the tests from the command line as you suggest ( However, if I try to run them either from the command line without explicitly setting RAILS_ENV (
If I try to run the konacha server (
However, if I include
then the server runs correctly without problems. Does that give you any clues? |
Yes, so a few moments that were fixed in the fork:
This fix removes But when you run tests in |
Here is a discussion around the issue: rails/sprockets-rails#299 |
@alexkravets your branch worked for me (albeit with a very simple test suite) using |
@alexkravets I get the same as @stevenchanin for my projects. I get the effect of it (say we have that file just fine if we're running konacha tests) but wouldn't it be better to be something like |
@hugocorbucci great idea! Will work on that. |
Sorry @alexkravets. By no means was I trying to give you more work. I was just trying to understand the solution :) |
@hugocorbucci absolutely, no problem. I've not started yet. |
@alexkravets - Thanks very much for the work so far. We're testing a branch of our project now that uses your fork & that allows us to bump up Rails versions and others. So far, it looks good. |
@hugocorbucci @stevenchanin please check this out: alexkravets@f049dcf — latest commit removes test environment requirement, so all Please check if everything works on your end and if there are no issues, I'll make a pull request. |
This just worked for me! Before this, I had to add all my assets manually to |
I can confirm that the OpenStreetMap code works fine with your patches applied. One thing to beware of is that with that applied you must use the newer sprockets-rails, so the gemspec will need updating to reflect that. |
@tomhughes thanks, fixed! |
@alexkravets Just tried the newest version (e2c6f85) and it worked perfectly for me without having to specify the environment. Nice work! |
thank you guys! |
@alexkravets Yep! Solved all my projects too. Great job! Thanks a lot @jfirebaugh Any chance if @alexkravets issues a PR that we'll get a new version in rubygems? |
I'm happy to accept a PR that adds compatibility for sprockets 3.0, subject to the following backward compatibility constraints:
|
I’m not sure exactly what needs to change. Here’s what another gem did to fix it: jfirebaugh/konacha#216
I’m not sure exactly what needs to change. Here’s what another gem did to fix it: jfirebaugh/konacha#216
I’m not sure exactly what needs to change. Here’s what another gem did to fix it: jfirebaugh/konacha#216
Hi, thanks for your work on konacha.
I found a problem today with the newly released sprockets-rail 3.0.0.
when running the konacha specs (or pulling konacha into a rails app) using sprockets-rails 3.0.0 the following error occurs:
The text was updated successfully, but these errors were encountered: