iron-io / iron_mq_ruby

Ruby library for IronMQ.
http://www.iron.io
BSD 2-Clause "Simplified" License
35 stars 17 forks source link

Rest::HttpError: HTTP 400 Error Version mismatch #106

Closed bryandotnewton closed 8 years ago

bryandotnewton commented 8 years ago

Howdy,

I'm trying to use the latest master branch to run commands (in the console for now) against a v3 project and am getting the following error when using client.create_queue, client.queues.list, etc:

Rest::HttpError: HTTP 400 Error: Version mismatch: unsupported API version '3', expected version '2', please upgrade your client. See http://docs.iron.io from /Users/bryannewton/.rvm/gems/ruby-2.2.3/gems/rest-3.0.6/lib/rest/wrappers/net_http_persistent_wrapper.rb:103:in `get'

The salient lines from gemfile.lock: iron_core (1.0.9) rest (>= 3.0.4) iron_mq (6.0.1) iron_core (>= 0.5.1)

The client has the correct token and project_id for my ironMQ project. I feel as though I'm missing something very obvious but I'm just not seeing it. Any ideas? Please let me know what additional info, if any, you need!

rdallman commented 8 years ago

Hi @bryandotnewton it looks like you're using the v3 library to make requests against a v2 mq. I think this is a bug, we need to fix the default host to a v3 one (filed an issue to do this when one of us is at CPU).

If you want to use v3, you may have to manually set the host to mq-aws-us-east-1-1.iron.io . If you were wanting to use v2 (I don't think you were) you'll need to use a version 5.x version of this library and not the latest (6.x). Apologize for this, we've since improved that error and we will set a correct default soon.

Please let us know if this resolves the issue for you, will leave this open until we fix the host.

bryandotnewton commented 8 years ago

Thanks, @rdallman! I will give this a shot.

bryandotnewton commented 8 years ago

@rdallman That seems to have worked. Thanks again.

abloch commented 8 years ago

isn't all the iron_worker deprecated in favor of docker worflow anyways

treeder commented 8 years ago

This is for IronMQ