arches / whacamole

restart heroku dynos that run out of RAM instead of swapping to disk
115 stars 12 forks source link

URI Argument Error #17

Open carl-warburton opened 7 years ago

carl-warburton commented 7 years ago

When starting up Whacamole I encounter a URI bad argument error. I have implemented the gem according to the readme file and cannot work out why, could this be because it is not compatible with rails 5?

/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/uri/common.rb:716:in `URI': bad argument (expected URI object or URI string) (ArgumentError)

carl-warburton commented 7 years ago

When stepping through the process in rails console I receive this error message:

2.3.4 :005 > Whacamole::Stream.new(stream_url, heroku, 500).watch NoMethodError: undefined method `join' for "web":String Did you mean? JSON

daveanderson88 commented 6 years ago

I have the same problem:

2018-02-06T10:28:48.631816+00:00 app[whacamole.1]: bundler: failed to load command: whacamole (/app/vendor/bundle/ruby/2.3.0/bin/whacamole) 2018-02-06T10:28:48.631907+00:00 app[whacamole.1]: ArgumentError: bad argument (expected URI object or URI string) 2018-02-06T10:28:48.631910+00:00 app[whacamole.1]: /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/uri/common.rb:716:in URI' 2018-02-06T10:28:48.631912+00:00 app[whacamole.1]: /app/vendor/bundle/ruby/2.3.0/gems/whacamole-1.2.0/lib/whacamole/stream.rb:16:inwatch' 2018-02-06T10:28:48.631914+00:00 app[whacamole.1]: /app/vendor/bundle/ruby/2.3.0/gems/whacamole-1.2.0/lib/whacamole.rb:23:in `block (2 levels) in monitor'

daveanderson88 commented 6 years ago

I had originally pasted the api token into the line below, but leaving this line as is and adding the token as an environment variable fixed the issue for me. config.api_token = ENV['HEROKU_API_TOKEN']