Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Still no love on ubuntu
Chet Farmer
8/15/2006 12:20:00 AM
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
--
Posted via
http://www.ruby-...
.
2 Answers
Chet Farmer
8/15/2006 12:24:00 AM
0
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.ph...
best,
c
--
Posted via
http://www.ruby-...
.
Jamey Cribbs
8/15/2006 12:43:00 AM
0
Chet Farmer wrote:
> 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.ph...
>
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
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Still no love on ubuntu
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password