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

locale': undefined method `[]' for nil:NilClass #191

Open
8biteric opened this issue Feb 18, 2022 · 2 comments
Open

locale': undefined method `[]' for nil:NilClass #191

8biteric opened this issue Feb 18, 2022 · 2 comments

Comments

@8biteric
Copy link

Hey gang... trying to get Dugway running locally and failing. I have been able to get it to run in the past, but no go on the server locally today. I think it's gagging on this error:

/Library/Ruby/Gems/2.3.0/gems/dugway-1.0.4/lib/dugway/store.rb:127:in locale': undefined method []' for nil:NilClass (NoMethodError)

Which points to this code in store.rb:

    def locale
      currency['locale']
    end

I'm admittedly a bit of a dinosaur when it comes to coding – I'm a PHP guy – so I'm not quite up to speed on Ruby. Obviously Dugway isn't finding what it's looking for with currency.

I'll bet this is a quick fix. Any ideas?

@8biteric
Copy link
Author

8biteric commented Feb 18, 2022

I was able to get things running by declaring locale right in the definition:

def locale
    "en-US"
end

@brettchalupa
Copy link
Contributor

@8biteric thanks for sharing this & glad you found a way to bypass the issue. I will do some investigating into it and see what I can do to fix it. Was there a longer stack trace? Just curious about some more info to help dig into the cause.

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