civo / cli-rubygem

Command line interface for interacting with Civo's cloud API
https://www.civo.com
MIT License
15 stars 4 forks source link

undefined method `colorize' for nil:NilClass (NoMethodError) #35

Open alexellis opened 4 years ago

alexellis commented 4 years ago
k3sup-civo-tutorial$ ./add-agents.sh 
The IP of the server is: 91.211.152.189
Adding nodes 2, 3, and 4
Building new instance k3sup-agent-2: Done
Created instance k3sup-agent-2 - civo@91.211.152.241 in 00 min 43 sec
Building new instance k3sup-agent-3: Done
Created instance k3sup-agent-3 - civo@91.211.152.221 in 01 min 57 sec
Building new instance k3sup-agent-4: Traceback (most recent call last):
    13: from /usr/local/bin/civo:23:in `<main>'
    12: from /usr/local/bin/civo:23:in `load'
    11: from /var/lib/gems/2.5.0/gems/civo_cli-0.3.10/exe/civo:6:in `<top (required)>'
    10: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
     9: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
     8: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
     7: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
     6: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
     5: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
     4: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
     3: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
     2: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
     1: from /var/lib/gems/2.5.0/gems/civo_cli-0.3.10/lib/instance.rb:115:in `create'
/var/lib/gems/2.5.0/gems/civo_cli-0.3.10/lib/instance.rb:159:in `rescue in create': undefined method `colorize' for nil:NilClass (NoMethodError)

I was simply adding 3 instances with a similar command to #34

AndrewCsoka commented 4 years ago

I hit the same error with a different command. I had not yet set a default apikey and ran into this:

$ civo apikey current
Traceback (most recent call last):
        14: from /Users/andy/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'
        13: from /Users/andy/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
        12: from /Users/andy/.rvm/gems/ruby-2.6.3/bin/civo:23:in `<main>'
        11: from /Users/andy/.rvm/gems/ruby-2.6.3/bin/civo:23:in `load'
        10: from /Users/andy/.rvm/gems/ruby-2.6.3/gems/civo_cli-0.4.0/exe/civo:6:in `<top (required)>'
         9: from /Users/andy/.rvm/gems/ruby-2.6.3/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
         8: from /Users/andy/.rvm/gems/ruby-2.6.3/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
         7: from /Users/andy/.rvm/gems/ruby-2.6.3/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
         6: from /Users/andy/.rvm/gems/ruby-2.6.3/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
         5: from /Users/andy/.rvm/gems/ruby-2.6.3/gems/thor-0.19.1/lib/thor.rb:235:in `block in subcommand'
         4: from /Users/andy/.rvm/gems/ruby-2.6.3/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
         3: from /Users/andy/.rvm/gems/ruby-2.6.3/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
         2: from /Users/andy/.rvm/gems/ruby-2.6.3/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
         1: from /Users/andy/.rvm/gems/ruby-2.6.3/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
/Users/andy/.rvm/gems/ruby-2.6.3/gems/civo_cli-0.4.0/lib/apikey.rb:42:in `current': undefined method `colorize' for nil:NilClass (NoMethodError)