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

ActionView::Template::Error (wrong number of arguments (given 2, expected 0..1) #234

Open
TablGithub opened this issue May 23, 2019 · 5 comments · May be fixed by #235
Open

ActionView::Template::Error (wrong number of arguments (given 2, expected 0..1) #234

TablGithub opened this issue May 23, 2019 · 5 comments · May be fixed by #235

Comments

@TablGithub
Copy link

Getting ActionView::Template::Error (wrong number of arguments (given 2, expected 0..1) after bundle update

I ran bundle update in my project and it updated several gems. once I tried to run 'rails s' and open the site in localhost it gave me this error.

"Showing ../_head.html.erb where line #12 raised:
wrong number of arguments (given 2, expected 0..1)

  1. <%= metamagic site: "Title", title: -> { title.include?(site) ? title : "#{title} - #{site}" if title} %>
  2. <%= include_gon %>
  3. <%= favicon_link_tag 'favicon.ico' %>
  4. <%= csrf_meta_tags %>
  5. <%= stylesheet_link_tag 'application', media: 'all' %>"

My system configurations are<
rbenv 1.1.2-2-g4e92322
ruby 2.5.1p57
Bundler version 1.17.2
Rails 5.2.2

I have noticed that livingstyleguide is updated to 2.1.0. Once I have build the application without the livingstyleguide gem, all seems fine. And I when I have updated my Gemfile to install 2.0.3 version, again all seems fine. Looks like a issue with using 2.1.0.

@hagenburger
Copy link
Member

Hey @TablGithub, as the switch from sass to sassc is the only change between 2.0.3 and 2.1.0, it’s pretty hard to get an idea what could probably cause this.

If you comment out line 12, does a similar error happen elsewhere?

@TablGithub
Copy link
Author

Yes same exceptions throws at line number 14 again. using 2.0.3 is the only solution worked for me.

@hagenburger
Copy link
Member

This seems very tricky. I’ll be open for specific questions whenever I can help if you investigate on this.

@rmehner
Copy link

rmehner commented Jun 12, 2019

Btw. this is the error message I'm seeing with #233, when I try to swap in sassc-rails for sass-rails, so that might be related.

Just adding more information, still need to figure out what the root cause is :)

@andyduong1920
Copy link

But 2.0.3 doesn't work with the new sassc 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants