井底之蛙

March 6, 2007

no such file to load — openssl

Filed under: ruby

Playing with scRUBYt! is not very easy. When I try to run the following example it complained there is no ‘openssl’ lib could found.

require ‘rubygems’
require ’scrubyt’

google_data = Scrubyt::Extractor.define do
  fetch ‘http://www.google.com/’
  fill_textfield ‘q’, ‘ruby’
  submit
      
  result ‘Ruby Programming Language’
end

google_data.to_xml.write($stdout, 1)
Scrubyt::ResultDumper.print_statistics(google_data)

I googled and found maybe need ‘libopenssl-ruby1.8‘. After ‘apt-get install libopenssl-ruby1.8′, it still complained no ‘openssl’ cound found.

In the end, I found a solution here. Because I installed Ruby from compiling source, I should compile to install ‘openssl’ lib also.

Enter your ruby-source/ext/openssl directory and then

ruby extconf.rb
make
make install

Well, now the scRUBYt! example could run without any complains. Good.

Comments »

The URI to TrackBack this entry is: http://emmet.blogsome.com/2007/03/06/no-such-file-to-load-openssl/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.






















Get free blog up and running in minutes with Blogsome
Theme designed by Minz Meyer