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 at /admin/sessions/new #2245

Open
kurukuruk opened this issue Oct 15, 2021 · 5 comments
Open

ArgumentError at /admin/sessions/new #2245

kurukuruk opened this issue Oct 15, 2021 · 5 comments

Comments

@kurukuruk
Copy link

Do you want to request a feature or report a bug?

bug

What is the current behavior?

I try "blog tutorial" to get started with padrino (https://padrinorb.com/guides/getting-started/blog-tutorial/)
I generate the project padrino g project blog-tutorial -t rspec -e haml -c scss -s jquery -d sequel -b
I generate admin padrino g admin
I visit "/admin":
ArgumentError at /admin/sessions/new wrong number of arguments (given 2, expected 0..1)
file: i18n.rb location: translate line: 196
_C:/Users/.../blog-tutorial/admin/views/sessions/new.haml in _tilt_37500

Maybe the "pat()" method ?

Which versions of Ruby, Padrino, Sinatra, Rack, OS are you using? Did this work in previous versions?

Microsoft Windows 10 Professionnel
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x64-mingw32]
Padrino v. 0.15.1
sinatra (2.1.0)
i18n (1.8.10)
puma (5.5.2)
rake, version 13.0.6

I dont know if this work in previous versions, it is my first time on padrino.

@jaydorsey
Copy link

jaydorsey commented Oct 15, 2021

Ruby 3.x changes the behavior of keyword arguments. I suspect this is the root cause of the error.

You can see this similarly reported for rails 5

I confirmed that downgrading to ruby 2.7.3 fixes this problem, so this is the likely cause (seems like a padrino bug edit: with ruby 3.x compatibility. or maybe sinatra)

@kurukuruk
Copy link
Author

Thanks, I've downgraded to ruby 2.6.8 and it work. It was the keyword arguments behavior.

@jinshen-cn
Copy link

Will padrino be updated to work with ruby 3.0?

@nesquena
Copy link
Member

Will padrino be updated to work with ruby 3.0?

To be candid I don't know if it's fair to say we have any active developers on Padrino at this point. But I'm here to merge PRs and release versions for as long as people still want them!

I myself still use Padrino on some projects but I am keeping all of those on Ruby 2.X. However it would be great if we had a version I could release that worked for recent versions of 2 and 3.

@jinshen-cn
Copy link

I did a minor change to fix it.
Thanks, @nesquena for merging my PR on this.

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

4 participants