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
ii libruby1.8 1.8.2-7sarge5 Libraries necessary to run Ruby 1.8
ii rdoc 1.8.2-1 Generate documentation from ruby
source file
ii ruby 1.8.2-1 An interpreter of object-oriented
scripting
ii ruby1.8 1.8.2-7sarge5 Interpreter of object-oriented
scripting lan
ii ruby1.8-dev 1.8.2-7sarge5 Header files for compiling extension
modules
--
Alex
You're cut off there for some reason, but you should make sure you have
libopenssl-ruby1.8 installed, not just libopenssl-ruby.
> Alex
--Greg
--
Alex
$ 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
--
Alex
Compare:
apt-cache policy libopenssl-ruby
apt-cache policy libopenssl-ruby1.8
It looks like libopenssl-ruby is targeted at ruby 1.8.2.
> Alex
--Greg
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
> Alex
--Greg
Just for information, debian packages work this way: for each ruby
thing packaged for debian, there are (at least) two packages a
lib...-ruby and a lib...ruby1.8. The former is empty and depends on the
latter and is there to make the transition to newer versions of ruby
more easy (for the maintainers). packagers can also choose to provide a
-ruby1.9 version. (this is not true for all packages, but for the
greatest majority).
Vince, waiting to get upload rights to the debian archive...
--
Vincent Fourmond, PhD student (not for long anymore)
http://vincent.fourmond.neuf.fr/
https://nm.debian.org/nmstatus.php?email=vincent.fourmond%409online.fr
Wrong!
libopenssl-ruby is simply a dummy package designed to install the
appropriate version of the package for the appropriate version of the
interpreter. By installing ruby, you get ruby 1.8 pulled in as a dependancy
(as opposed to ruby 1.9). Likewise, by installing libopenssl-ruby, you get
libopenssl-ruby1.8 as opposed to 1.9. One day when 2.0 becomes the new
stable, you'll be upgraded to ruby2.0 and libopenssl-ruby2.0 automatically
because they'll be the new dependancies for the dummy package.
Package: libopenssl-ruby
[snip part of the description]
Description: OpenSSL interface for Ruby
This package makes Ruby to be able to use OpenSSL. It includes HTTP and
TELNET protocols' SSL/TLS support.
.
This package is a dependency package, which depends on Debian's default
Ruby version (currently 1.8.x).
--
Ken Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/