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

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).

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.

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?

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, 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: