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

Invalid version of rubyntlm #600

Closed
ailnlv opened this issue Jul 18, 2014 · 13 comments
Closed

Invalid version of rubyntlm #600

ailnlv opened this issue Jul 18, 2014 · 13 comments

Comments

@ailnlv
Copy link

ailnlv commented Jul 18, 2014

I tried installing savon with gem install savon, but I keep getting this error when requiring the gem:

$ echo 'require "savon"'|ruby
/Users/yo/.rvm/gems/ruby-2.1.2/gems/httpi-2.2.4/lib/httpi/adapter/net_http.rb:12:in `<top (required)>': Invalid version of rubyntlm. Please use v0.3.2+. (ArgumentError)
...

I tried installing several versions of rubyntlm, but I keep getting the same error:

$ gem list | grep rubyntlm
rubyntlm (0.4.0, 0.3.3, 0.3.2)

This problem is present on savon 2.6.0, but not in 2.5.1.
Any ideas?
I'm using ruby 2.1.2 with rvm on OSX.

@sadowski
Copy link

Having this same problem with 2.6.0

@iacobus
Copy link

iacobus commented Jul 22, 2014

I came up with this issue as well. The problem is actually inside of httpi - I believe it to be caused by an incompatibility between the rubyntlm and the ntlm-http gems. Both of them define Net::NTLM::VERSION, and when 'httpi' requires the constant it is getting the one from ntlm-http and not the one from rubyntlm. I guess that both of you have both gems installed in your system, like I have.

The way I 'solved' the problem was by creating a Gemfile, and requiring both 'savon' and 'rubyntlm' (version 0.4.0). 'rubyntlm' is a development dependency of 'httpi', but it feels like it should be a runtime dependency, given that it explicitly fails to load if the correct version is not being used. I believe that the authors of 'savon' and 'httpi' are the same, so hopefully they can throw some clarity here.

If you happen to have a project that need both of these gems (ntlm-http is a dependency of mechanize, for instnace), I'm not sure how to solve the problem.

Hope that helps.

@ailnlv
Copy link
Author

ailnlv commented Jul 23, 2014

Fortunately 2.5.1 works fine for me, but your workaround seems to work as well.

@dereeno
Copy link

dereeno commented Jul 23, 2014

+1
Any updates?

@thomaswitt
Copy link

Same here. As soon as I require 'savon', '~> 2.5.1' everything works fine. 2.6.0 won't work - but it will work when adding to the Gemfile:

gem 'rubyntlm', '~> 0.3.2'

@tjarratt
Copy link
Contributor

Sorry for the delay in responding, everyone, but this was caused by some well-meaning shenanigans in HTTPi, which you can read about here if you're interested. This should be resolved if you have HTTPI v2.2.1 installed.

@jcutrell
Copy link

I'm in a situation where I'm using mechanize and Mandrill - they have colliding versioning. Anyone else found a solution for this?

@nurettin
Copy link

I'm trying to use savon 2.9.0 with ruby 2.2.0.
I tried httpi 2.2.1, rubyntlm 0.3.2, it's still giving this error.

@JosephCastro
Copy link

I get the same error with 2.10.0 so I change to 2.5.1 and works fine

@johanlunds
Copy link

I also just had this error. Re-open?

@acrogenesis
Copy link

I'm also having this error

@schappim
Copy link

this error still occurs

@tjarratt
Copy link
Contributor

This error still occurs because it exists to warn you that the dependencies you have loaded will not work together. It makes me sad that this is an error, but given where HTTPI is today, it was the best implementation.

The fix for this is to ensure that you ONLY are using rubyntlm v0.3.2 or greater, regardless of whether or not you use rubyntlm. Perhaps one of your dependencies added rubyntlm -- you may want to start the discussion there why they are using an older version of rubyntlm.

@savonrb savonrb locked and limited conversation to collaborators May 25, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests