no such file to load — openssl
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.
