PDA

View Full Version : Ruby on Rails and openssl


tom
01-25-2006, 09:37 PM
Hi -

I've got ruby 1.8.4 installed, along with rails 1.0.0 & switchtower 0.10.0

But switchtower won't deploy, I get an error:

# rake remote_exec ACTION=setup
(in /root/rubyconf)
loading configuration /usr/local/lib/ruby/gems/1.8/gems/switchtower-0.10.0/lib/switchtower/recipes/standard.rb
loading configuration ./config/deploy.rb
executing task setup
executing "mkdir -p -m 775 /var/web/rubyconf/releases /var/web/rubyconf/shared/system &&\n mkdir -p -m 777 /var/web/rubyconf/shared/log"
servers: ["localhost"]
rake aborted!
no such file to load -- openssl


I've built several ruby installation before without any problems, but this is the first ruby 1.8.4. has anyone run into this?

I've checked around on the net, and installed openssl-devel, and reinstalled everything (ruby/rails/switchtower). No joy.

Found a reference to something related here: http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/3330721bda835ca5/9e4aafbf182643d7?lnk=st&q=%22SSL+is+not+installed+on+this+system%22&rnum=1&hl=en#9e4aafbf182643d7
but I can't find the "libopenssl-ruby" they mention.

I'm not really sure what the default rimu distro is, but I also found this at http://www.vmunix.com/mark/blog/archives/category/coding/


RHEL Update 2 fixes OpenSSL problem for Ruby
1 Comment Published by mark December 14th, 2005 in general, solaris, coding

I don’t know what changed exactly, but I can now use OpenSSL in Ruby. I just recompiled ruby 1.8.3 from source after a “yum update” to Update 2 and now I can use OpenSSL:


Any help appreciated.

Tom

tom
01-27-2006, 03:47 AM
It seems there is something missing from ruby 1.8.4.

I installed 1.8.2, since that had worked on other machines, and it worked. Then I went to 1.8.4 again, and it works now. (note that I had already reinstalled 1.8.4 twice previously with no effect)

rsanheim
02-07-2006, 07:18 AM
So did you have to reinstall ruby from scratch and all the libraries it needs, or just ruby?

tim_o
10-19-2006, 02:07 PM
I'm running into the same issue. This is a new rimuhosting Ubuntu setup with the rails stack installed by the admin.

It appears that the stack somehow messes up ruby's https support. I am running Ubuntu 6 at home, and the following test ruby script works:

require 'net/https'
p 'hello world'

However on my rimuhosting account, the above piece of code fails, even though all of the required libraries are installed. It appears that ruby is running from /usr/local/bin/ruby, so it isn't even using the ubuntu version. The rails.sh stack appears to try to prevent this, so I am at a loss. Almost tempted to wipe out /usr/local, but this could have unforseen consequences.

** Edit **

I ended up recompiling ruby from source and installing to /local and this solved the issue. I do not recommend deleting /usr/local as there appear to be some other applications installed in there by rimuhosting