-
Notifications
You must be signed in to change notification settings - Fork 2
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 (2 for 1) #4
Comments
Ah, ok.. It seems that the last (gem) release is quite out of date.. # BROKEN
# installed normally in Gemfile, no mention of github repo
module StraightServerKit
class OrderResource < ResourceKit::Resource
API_ERROR_HANDLER = *lambda* do |response|
raise ApiError.new(status: response.status, message: response.body)
end Works (more or less, see text below): # WORKS
# installed via git in Gemfile
# gem 'straight-server-kit', git: "[email protected]:MyceliumGear/straight-server-kit.git"
module StraightServerKit
class OrderResource < ResourceKit::Resource
API_ERROR_HANDLER = *proc* do |response|
raise ApiError.new(status: response.status, message: response.body)
end Any hints if this is getting updated? EDIT: Removed other exceptions here reporeted, since they origin was on my side |
I changed lambda to proc as you said. Then the error "wrong number of arguments (2 for 1)" is disappeared. But I got another error: |
Ah. I encountered this issue on my production environment. The host is ubuntu16. I modified lambda to proc but it didn't work this time. My local host is Centos7. It works well. Doesn't it support ubuntu16? And how to fix it? |
Tried to implement your example at the end in your documentation (https://admin.gear.mycelium.com/docs/api/creating_orders), but it doesnt work... Any hints?
Thanks!
The text was updated successfully, but these errors were encountered: