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

undefined method `each_pair' for an instance of String #870

Open
pasquale95 opened this issue Jan 22, 2025 · 0 comments
Open

undefined method `each_pair' for an instance of String #870

pasquale95 opened this issue Jan 22, 2025 · 0 comments

Comments

@pasquale95
Copy link

Hi, I'm trying to run the travis CLI on my macOS, but when I run the command travis logs I get the following error:

❯ travis logs  
/Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/cli/command.rb:334:in `format': wrong number of arguments (given 5, expected 1..3) (ArgumentError)
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/cli/command.rb:315:in `store_error'
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/cli/command.rb:235:in `rescue in execute'
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/cli/command.rb:200:in `execute'
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/cli.rb:66:in `run'
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/bin/travis:21:in `<top (required)>'
        from /Users/test/.asdf/installs/ruby/3.3.2/bin/travis:25:in `load'
        from /Users/test/.asdf/installs/ruby/3.3.2/bin/travis:25:in `<main>'
/Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/client/session.rb:149:in `load': undefined method `each_pair' for an instance of String (NoMethodError)

        (data || {}).each_pair do |key, value|
                    ^^^^^^^^^^
Did you mean?  each_char
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/client/session.rb:177:in `get'
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/client/session.rb:356:in `fetch_one'
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/client/session.rb:102:in `block in find_one'
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/client/session.rb:366:in `cached'
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/client/session.rb:102:in `find_one'
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/client/methods.rb:45:in `repo'
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/cli/repo_command.rb:37:in `repository'
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/cli/repo_command.rb:33:in `setup'
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/cli/logs.rb:21:in `setup'
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/cli/command.rb:207:in `execute'
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/lib/travis/cli.rb:66:in `run'
        from /Users/test/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/travis-1.14.0/bin/travis:21:in `<top (required)>'
        from /Users/test/.asdf/installs/ruby/3.3.2/bin/travis:25:in `load'
        from /Users/test/.asdf/installs/ruby/3.3.2/bin/travis:25:in `<main>'

I've seen this error being mentioned in issues from 2020. Do you know the fix?

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

1 participant