-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
On Rails 4.2 webpacker erb extension raises an error #1382
Comments
@mdesantis I commented it out earlier but seems like it sneaked back in. Could you please comment out |
Hi @gauravtiwari , your workaround worked, the issue disappeared transforming the |
Great 👍 yep this was fixed earlier but seems like it got changed later. Could you please make a PR with the fix and I will merge? |
What if I modify the // Run this example by adding <%%= javascript_pack_tag 'hello_erb' %> to the head of your layout file,
// like app/views/layouts/application.html.erb. Please take care of removing the extra `%` from `<%%=`:
// we can't write the correct ERB tags here, they would get interpreted. Sounds good? Can you please check if it is a correct sentence? My english is bad :) |
@mdesantis Looks about right. If you make a PR we can tweak it there 👍 thank you |
I don't understand why you use <%%= instead of <%#= which is the standard way for ERB commenting. |
@VRRmax if I remember correctly, the reason is that otherwise that line gets interpreted by the generator which would raise an error at Webpacker installation. So |
Just want to let you know the error still exists as of today for a different case (erb):7:in For those moving from application.js to application.js.erb note that you have this in the application.js.erb
and it should be changed to this
|
Hello,
I tried with a new Rails 4.2.10 webapp (Ruby 2.3.6, webpacker 3.4.1). This is the error (running
bin/webpack
):I have a reproducing script (it uses
asdf
in order to set Ruby version, feel free to change it):The text was updated successfully, but these errors were encountered: