Still no love on ubuntu

C

Chet Farmer

I posted last week about some trouble I was having getting Ruby (not
rails; just ruby) to function properly on either OS X (10.4) or Ubuntu.
A kind soul pointed out my mistake, which got Ruby working fine on the
Mac, and I was able to finish writing the small tool I needed to do.

However, now I need to deploy on Ubuntu, and the code that works on OS X
produces a rather dramatic error on Ubuntu.

Error:
$ ./xm.rb
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- openssl (LoadError)
from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from
/usr/lib/ruby/gems/1.8/gems/net-ssh-1.0.9/lib/net/ssh/transport/ossl/services.rb:17
from
/usr/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/container.rb:354:in
`require'
from
/usr/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/definition-context.rb:77:in
`require'
from
/usr/lib/ruby/gems/1.8/gems/net-ssh-1.0.9/lib/net/ssh/transport/services.rb:137:in
`register_services'
from
/usr/lib/ruby/gems/1.8/gems/net-ssh-1.0.9/lib/net/ssh/transport/services.rb:23:in
`define'
from
/usr/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/container.rb:250:in
`namespace_define'
from
/usr/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/container.rb:250:in
`call'
... 17 levels...
from ./xm.rb:14:in `find'
from /usr/lib/ruby/1.8/find.rb:38:in `catch'
from /usr/lib/ruby/1.8/find.rb:38:in `find'
from ./xm.rb:14

Listing:

#!/usr/bin/ruby

require 'find'
require 'fileutils'
require 'rubygems'
require 'net/ssh'
require 'net/sftp'

asndir = "/home/arfid/ASN"
donedir = "/home/arfid/done"

Find.find(asndir) do |path|
if File.basename(path) =~ /^DOD/
begin
Net::SFTP.start('192.168.1.102', 'user', 'xxxxx') do |sftp|
sftp.put_file(path, "#{File.basename(path)}")
end
FileUtils.mv(path, "#{donedir}/#{File.basename(path)}")
rescue StandardError
$stderr.print "ASN Transmission Problem: " + $! + "\n"
raise
end
else
next
end
end
 
C

Chet Farmer

Belay that. Of course, after posting, I found an answer almost
immediately where none had been before.

I was missing an apt-gettable library. I'm not sure which, since I took
the "shotgun" approach and did this:

sudo sudo apt-get install libzlib-ruby libyaml-ruby libdrb-ruby
liberb-ruby zlib1g-dev libopenssl-ruby

that I found here:

http://www.ubuntuforums.org/showthread.php?t=191701


best,
c
 
J

Jamey Cribbs

Chet said:
Belay that. Of course, after posting, I found an answer almost
immediately where none had been before.

I was missing an apt-gettable library. I'm not sure which, since I took
the "shotgun" approach and did this:

sudo sudo apt-get install libzlib-ruby libyaml-ruby libdrb-ruby
liberb-ruby zlib1g-dev libopenssl-ruby

that I found here:

http://www.ubuntuforums.org/showthread.php?t=191701
Chet, if you take a look at the third line of the error message you
posted previously, it points out the file you were missing (the openssl
library).


$ ./xm.rb
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- openssl (LoadError)




Hope this helps in any future debugging.

Jamey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top