Rails on Plesk (missing libraries and gems)

Hello, my ISP (PlusNet) is switching their hosting platform to Plesk
which has RoR but there is little support provided by the ISP.

I’ve been trying to install an application and have hit the buffers
because there are various items missing (currently I’m stuck wanting for
net/https for ActiveMerchant). Gem is not installed on Plesk and I have
limited access (no shell logon) to do stuff.

What I would like to do is identify my applications dependencies and
somehow freeze them into the vendor tree. Is this possible ?

By this I mean freeze not only rails but any other gems my application
relies upon. Also things that aren’t gems (I don’t think net/https) is a
gem (I think it was libopenssl-ruby on my Ubuntu dev platform).

Any help would be appreciated. I would like to get a real application
running on this Plesk platform.

Many thanks

On 19 Nov 2008, at 00:37, John L. wrote:

What I would like to do is identify my applications dependencies and
somehow freeze them into the vendor tree. Is this possible ?

By this I mean freeze not only rails but any other gems my application
relies upon. Also things that aren’t gems (I don’t think net/https)
is a
gem (I think it was libopenssl-ruby on my Ubuntu dev platform).

With rails 2.1 you can vendor any gems you want into the app. Check
out config.gems and the gem related rake tasks.
You’re probably boned if they haven’t installed bits of standard
library like libopenssl.

Fred

Thanks Fred. I arrived at the conclusin that Rails requires that
RubyGems is available. Because I don’t have root access I have installed
RubyGems with a repository in my home dir. It works - I’ve confirmed
that I can install a gem. I’ve actually now got my own copy of Rails
2.2.2. I thought I’d start by generating a “hello, world” test app (e.g
by doing “rails testapp”). First, I added rails to my path.

$ rails -v
rails 2.2.2

$ rails testapp
create
create app/controllers
create app/helpers

create log/development.log
create log/test.log

However, creating a test controller does not work. I get an error

…/rubygems/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:259:in
`require_frameworks’: no such file to load – openssl (RuntimeError)

Two Questions:

Why is openssl required for a simple test app that does not use
openssl and can I get around this?

How can I go about installing the openssl dependencies ?

I am doing this on a server to which I have no root access. I will need
to install any dependencies beneath my home directory. The ruby version
available to me is 1.8.5 and it’s on a server running Plesk with the
following id

$uname -a
Linux plesk-host02.plus.net 2.6.18-4-xen-686 #1 SMP Mon Mar 26
21:49:04 UTC 2007 i686 GNU/Linux

I feel that until I can get a basic test app working there is little
point in trying to get my real app up and running.

Thanks for any help.

The openssl library is probably there, I’d guess you’re only missing
the ruby bindings for it. You could probably build those in your home
directory (the source is part of the standard ruby distribution) but
that assumes you have access to gcc and all that sort of jazz.

Openssl is there. The ruby bindings are not. I presume these are what
the file /usr/lib/ruby/1.8/i486-linux/openssl.so would normally be.

Now I don’t have gcc access on the remote host so I tried to locally
rebuild the same ruby as on the hosting service and upload openssl.so
onto into the ruby library path. This allows me the privilege of seeing
a different error message:

openssl.so: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.4’ not found

Which makes me think that the two systems have different toolchains,
reinforced by this:

rwxrwxrwx 1 root root 13 Jul 26 2007 /lib/tls/i686/cmov/libc.so.6 ->
libc-2.3.6.so

Where the host used to build has this:

lrwxrwxrwx 1 root root 11 2007-05-17 21:11 /lib/tls/i686/cmov/libc.so.6
-> libc-2.5.so

I don’t think I want to wander down the route of matching toolchains so
unless there are any clever ideas, I think it’s time to give up on this
until the hosting provider can rebuild Ruby with the openssl toolchain.

On Nov 28, 1:46 pm, John L. [email protected]
wrote:

$ rails testapp
`require_frameworks’: no such file to load – openssl (RuntimeError)

Two Questions:

Why is openssl required for a simple test app that does not use
openssl and can I get around this?

It’s used for things like the digest used for the cookie store,
generating random keys when you create a new project etc… If you
weren’t using the cookie store and had a preexisting project you might
get away with just commenting out the require ‘openssl’ line

How can I go about installing the openssl dependencies ?

I am doing this on a server to which I have no root access. I will need
to install any dependencies beneath my home directory. The ruby version
available to me is 1.8.5 and it’s on a server running Plesk with the
following id

The openssl library is probably there, I’d guess you’re only missing
the ruby bindings for it. You could probably build those in your home
directory (the source is part of the standard ruby distribution) but
that assumes you have access to gcc and all that sort of jazz.

Fred

John,

do you have shell access? Have you tried installing libopenssl-ruby1.8
using something like apt-get or emerge if that is possible?


Ryan B.
Freelancer

Ryan,
Alas, no shell access. Nothing as simple as that. I have to write every
command I issue in a script, upload it and execute it with Cron. There’s
no compiler and I am unaware of this being on a standard distro with
apt-get or similar!
I wish it was that easy :wink: