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

ArgumentError: wrong number of arguments (given 5, expected 4) with ActionView 4.2.6 #55

Closed
gleenn opened this issue Sep 20, 2016 · 2 comments

Comments

@gleenn
Copy link

gleenn commented Sep 20, 2016

I'm getting explosions from the Fortitude railtie that's monkey-patching ActionView to help it autoload view classes. Looks like the monkey-patched method inside ActionView changed the method arity but Fortitude hasn't matched? I honestly don't really understand why my particular setup isn't working because I've used other Rails projects with higher and lower versions and didn't have problems.

I also hacked Fortitude gem source and added the missing method param, passing it straight through and got everything working properly.

I'm currently on Rails 4.2.6 and attempting to use Foritude 0.9.4.

Any advice would be appreciated!

ArgumentError:
wrong number of arguments (given 5, expected 4)
# /Users/glenn/.rvm/gems/ruby-2.3.1/gems/fortitude-0.9.4/lib/fortitude/rails/railtie.rb:251:in find_templates_with_fortitude' # /Users/glenn/.rvm/gems/ruby-2.3.1/gems/actionmailer-4.2.6/lib/action_mailer/base.rb:914:ineach_template'
# /Users/glenn/.rvm/gems/ruby-2.3.1/gems/actionmailer-4.2.6/lib/action_mailer/base.rb:900:in collect_responses' # /Users/glenn/.rvm/gems/ruby-2.3.1/gems/actionmailer-4.2.6/lib/action_mailer/base.rb:829:inmail'
# ./app/mailers/application_mailer.rb:20:in mail_with_defaults' # ./app/mailers/welcome_mailer.rb:4:inwelcome_member'

@ageweke
Copy link
Owner

ageweke commented Sep 20, 2016

Really easy answer: update to using the latest code (gem “fortitude”, :git => ‘git://github.com/ageweke/fortitude.git'), rather than release.

I plan to publish a new version soon that includes this fix!

On Sep 20, 2016, at 3:08 PM, Glenn Jahnke notifications@github.com wrote:

I'm getting explosions from the Fortitude railtie that's monkey-patching ActionView to help it autoload view classes. Looks like the monkey-patched method inside ActionView changed the method arity but Fortitude hasn't matched? I honestly don't really understand why my particular setup isn't working because I've used other Rails projects with higher and lower versions and didn't have problems.

I also hacked Fortitude gem source and added the missing method param, passing it straight through and got everything working properly.

I'm currently on Rails 4.2.6 and attempting to use Foritude 0.9.4.

Any advice would be appreciated!

ArgumentError:
wrong number of arguments (given 5, expected 4)

/Users/glenn/.rvm/gems/ruby-2.3.1/gems/fortitude-0.9.4/lib/fortitude/rails/railtie.rb:251:in find_templates_with_fortitude'

/Users/glenn/.rvm/gems/ruby-2.3.1/gems/actionmailer-4.2.6/lib/action_mailer/base.rb:914:ineach_template'

/Users/glenn/.rvm/gems/ruby-2.3.1/gems/actionmailer-4.2.6/lib/action_mailer/base.rb:900:in collect_responses'

/Users/glenn/.rvm/gems/ruby-2.3.1/gems/actionmailer-4.2.6/lib/action_mailer/base.rb:829:inmail'

./app/mailers/application_mailer.rb:20:in mail_with_defaults'

./app/mailers/welcome_mailer.rb:4:inwelcome_member'


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #55, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJF7_jlwnHlq6hmvjGvuoIC8yPzlTVbks5qsFl0gaJpZM4KCMln.

@gleenn
Copy link
Author

gleenn commented Sep 21, 2016

Great, worked like a charm. Thanks!

@gleenn gleenn closed this as completed Sep 21, 2016
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

No branches or pull requests

2 participants