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

running into syntax errors, when running a list of commands #13

Closed
Konstantin-Held opened this issue Nov 7, 2018 · 3 comments
Closed

Comments

@Konstantin-Held
Copy link

Hello,

Recently I installed gazer on a debian8 VM. In general it is working fine. However there is a bunch of commands which produce syntax errors. I am curious, where this comes from and if it's specific problem with our setup or if something changed with looker version 5.24potentially. Maybe someone can replicate this.

I get the syntax error for these commands, it is always about an unexpected '.'

gzr plan ls
gzr user ls
gzr connection ls

This is what the error looks like:

gzr plan ls --host=my.looker.tls
/var/lib/gems/2.1.0/gems/gazer-0.2.6/lib/gzr/commands/plan/ls.rb:61:in `eval': (eval):1: syntax error, unexpected '.' (SyntaxError)
row.user&.id
          ^
        from /var/lib/gems/2.1.0/gems/gazer-0.2.6/lib/gzr/commands/plan/ls.rb:61:in `block (3 levels) in execute'
        from /var/lib/gems/2.1.0/gems/gazer-0.2.6/lib/gzr/commands/plan/ls.rb:60:in `collect'
        from /var/lib/gems/2.1.0/gems/gazer-0.2.6/lib/gzr/commands/plan/ls.rb:60:in `block (2 levels) in execute'
        from /var/lib/gems/2.1.0/gems/gazer-0.2.6/lib/gzr/commands/plan/ls.rb:59:in `map'
        from /var/lib/gems/2.1.0/gems/gazer-0.2.6/lib/gzr/commands/plan/ls.rb:59:in `block in execute'
        from /var/lib/gems/2.1.0/gems/gazer-0.2.6/lib/gzr/modules/session.rb:163:in `with_session'
        from /var/lib/gems/2.1.0/gems/gazer-0.2.6/lib/gzr/commands/plan/ls.rb:19:in `execute'
        from /var/lib/gems/2.1.0/gems/gazer-0.2.6/lib/gzr/commands/plan.rb:123:in `ls'
        from /var/lib/gems/2.1.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
        from /var/lib/gems/2.1.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
        from /var/lib/gems/2.1.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
        from /var/lib/gems/2.1.0/gems/thor-0.20.0/lib/thor/invocation.rb:115:in `invoke'
        from /var/lib/gems/2.1.0/gems/thor-0.20.0/lib/thor.rb:238:in `block in subcommand'
        from /var/lib/gems/2.1.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
        from /var/lib/gems/2.1.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
        from /var/lib/gems/2.1.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
        from /var/lib/gems/2.1.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
        from /var/lib/gems/2.1.0/gems/gazer-0.2.6/exe/gzr:14:in `<top (required)>'
        from /usr/local/bin/gzr:23:in `load'
        from /usr/local/bin/gzr:23:in `<main>

All the other commands I've been testing, have been working fine.
Could somebody potentially give me any insight on why this is happening?
Thanks!

@drstrangelooker
Copy link
Collaborator

What version of Ruby are you using. The &. operator is introduced in Ruby 2.3.

@Konstantin-Held
Copy link
Author

That actually was the problem! I was running Ruby 2.1.
After upgrading to 2.5 and reinstalling the gem, it works like a charm.
Thank you very much!

@drstrangelooker
Copy link
Collaborator

I added a line to the file gzr.gemspec so that the requirement for Ruby 2.3 is enforced.

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