Gregory said:
Hi all,
Does anybody recognise this?
$ gem check -t mechanize
ERROR: While executing gem ... (NameError)
method `use_ssl?' not defined in Net::HTTP
This is on a Debian system, so I've probably forgotten an apt-get
install somewhere, but I can't spot which one:
$ dpkg -l | grep ruby
ii libmysql-ruby1 2.4.5-6.1 MySQL module for Ruby 1.8
ii libopenssl-rub 1.0.0+ruby1.8. OpenSSL interface for Ruby
[...]
You're cut off there for some reason, but you should make sure you have
libopenssl-ruby1.8 installed, not just libopenssl-ruby.
That doesn't seem to be the issue:
$ sudo apt-get install libopenssl-ruby1.8 libopenssl-ruby
Reading Package Lists... Done
Building Dependency Tree... Done
libopenssl-ruby1.8 is already the newest version.
libopenssl-ruby is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo gem check -t mechanize
ERROR: While executing gem ... (NameError)
method `use_ssl?' not defined in Net::HTTP
Well, it was a thought. Trying it on my Debian box, I find that I can
install mechanize and it seems to work okay, but sudo gem check -t
mechanize produces:
/test/test_includes.rb:5: warning: already initialized constant BASE_DIR
/test/test_includes.rb:32: warning: already initialized constant SERVLETS
/test/test_includes.rb:35: warning: already initialized constant PAGE_CACHE
/test/test_includes.rb:110: warning: already initialized constant PORT
/test/test_includes.rb:111: warning: already initialized constant PROXYPORT
/test/test_includes.rb:112: warning: already initialized constant SSLPORT
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- test/htdocs/alt_text.html (LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /usr/local/lib/site_ruby/1.8/rubygems/validator.rb:134:in `unit_test'
from /usr/local/lib/site_ruby/1.8/rubygems/validator.rb:134:in `each'
from /usr/local/lib/site_ruby/1.8/rubygems/validator.rb:134:in `unit_test'
from /usr/local/lib/site_ruby/1.8/rubygems/gem_commands.rb:680:in `execute'
from /usr/local/lib/site_ruby/1.8/rubygems/command.rb:70:in `invoke'
from /usr/local/lib/site_ruby/1.8/rubygems/cmd_manager.rb:120:in `process_args'
from /usr/local/lib/site_ruby/1.8/rubygems/cmd_manager.rb:91:in `run'
from /usr/local/lib/site_ruby/1.8/rubygems/gem_runner.rb:30:in `run'
from /usr/local/bin/gem:17
...so at least I get a different error. It's possible that there is some
assumption about where I have RubyGems installed (/usr/local) that's
causing a problem. Here's my system:
% dpkg -l '*ruby*' | grep ii
ii libopenssl-ruby 1.0.0+ruby1.8.2-1 OpenSSL interface for Ruby
ii libopenssl-ruby1.8 1.8.5-3 OpenSSL interface for Ruby 1.8
ii libreadline-ruby1.8 1.8.5-3 Readline interface for Ruby 1.8
ii librmagick-ruby 1.13.0-1 ImageMagick API for Ruby
ii librmagick-ruby1.8 1.13.0-1 ImageMagick API for Ruby
ii libruby1.8 1.8.5-3 Libraries necessary to run Ruby 1.8
ii postgresql-8.1-plruby 0.5.0-1 Ruby procedural language for PostgreSQL
ii ruby 1.8.2-1 An interpreter of object-oriented scripting
ii ruby1.8 1.8.5-3 Interpreter of object-oriented scripting lan
ii ruby1.8-dev 1.8.5-3 Header files for compiling extension modules
--Greg