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
Incompatible with sprockets-rails 3.0? #135
Comments
What version of browserify-rails are you using? |
There is a bit of code that branches with a check to see if if config.respond_to?(:assets)
config.assets.configure do |env|
load_granular_configuration
env.register_postprocessor "application/javascript", BrowserifyRails::BrowserifyProcessor
end
else
initializer :setup_browserify do |app|
load_granular_configuration
app.assets.register_postprocessor "application/javascript", BrowserifyRails::BrowserifyProcessor
end
end Maybe with Sprockets 3.0 config does not respond to |
If so, the fix may be simply changing:
To something like:
One would need to implement |
One other thought is it could be your set of gems. Did you upgrade anything else when you upgraded |
I got the same error on all All other rails gems etc are at the latest version already. Not sure how to reach the |
I should clarify that PRs for this are welcomed if anyone has time to dig into it. I don't expect to any time soon :(. |
I got the same issue when I upgraded from Rails 4.2.1 to 4.2.5.1. Full stack trace:
|
Problem is here: Looking into a bit more. |
Hrm, not quite the problem but in the same area. Looks like autoprefixer ran into this. But their change is how we are configuring so it's some issue in our dependencies. |
I was able to fix by updating "lib/browserify-rails/railtie.rb:33" from:
to:
The new versions of sprockets components that came with Rails 4.2.5.1 are: |
Just upgrading to sprockets 3.5.2 seems to be fixing it for me. I'm just about to release a version w/ that but looks like 3.5.2 requires activesupport version that requires I upgrade ruby so going to take a minute. |
Thanks a lot. You rock! |
@AndyObtiva But that lower line is only run if config doesn't respond to assets (which it does with newer versions of things) so I think you have the same fix as me (the earlier line actually runs). So just upgrading sprockets should be 👍. |
@AndyObtiva Forgot to say, thanks. It is hard keeping track of these changes. Really helpful to have confirmation on right path :). |
@AndyObtiva @dbackeus I bumped the dependency in the gemspec on sprockets up to 3.5.2 and release browserify-rails 3.0.0. Would you try the new version and confirm it works correctly for you? Thanks! (and reopening -- I didn't mean for this to get closed until confirmed fixed) |
Worked for me. 👍 |
Still have the very same error... same line same file but now on version 3.0.0... sprockets-rails is at 3.0.2 and sprockets at 3.5.2. |
@dbackeus What version of Rails are you using? I tested with Rails 4.2.5.1 and it worked for me with browserify-rails 3.0.0. I'm checking Rails version with |
@dbackeus The other thing that would help is if you, with your version of Rails, can make a new project and pull in browserify-rails and add a simple module that demonstrates the failure. I'm happy to take a closer look. I suspect the issue comes down to some of these gems following Rails releases and we'd need more stringent versioning to be compatible with all versions of Rails. I think supporting current is enough but I'm open to ideas (and solutions). |
Closing due to lack of response. If anyone else has this issue, please reopen after pushing up an example failing Rails app to github. |
I have the same problem with browserify-rails 1.0.2, sprockets 3.7.0 and rails 4.2.7.1. Here is the clean project with this bug: https://github.com/kolomeetz/browserify-sprockets |
@kolomeetz browserify-rails 3+ should be compatible. I'd recommend trying the latest which is version 3.1.0. Is there a reason you're using such an old version (1.02)? |
@kolomeetz whoops, I meant 3.2.0 not 3.1.0. Anyway, does that fix it? |
Yes, my bad. 3.2.0 works perfectly! I'm sorry for having disturbed you. |
Got the same problem trying to run some specs in a rails eninge gem. Using sprockets 3.6.0, sprockets-rails 3.0.4, browserify-rails 3.3.0, and no rails, since it's an engine. #135 (comment) fixed it for me (changing line 35 in railtie.rb, the case of If you really really want me to publish an easily reproducible example, I can try tomorrow. |
@valentin-krasontovitsch So you still have the breakage with browserify-rails current (3.4.0)? If so, let's figure out a fix. I'm worried if I just make the change in comment 135, it'll break on earlier versions of Sprockets. The gemspec for browserify-rails has:
So I'd want to test with Sprockets 3.5.2 and if it is broken, either figure out a work around or bump the dependency to 3.6. |
@valentin-krasontovitsch I decided to just go for it -- can you try browserify-rails 4.0.0.b? The If so, I'll release 4.0.0. I figured might as well bump the major version just in case some people are stuck on Sprockets < 3.6.0. |
Sorry, was out for the day yesterday. |
After upgrading
sprockets-rails
to 3.0 I get the following boot time error:The text was updated successfully, but these errors were encountered: