View Full Version : Can we install Ruby?

05-07-2004, 03:10 AM

Can we install Ruby 1.8.1 on our virtual server (Value Package)? If we're allowed, I'm guessing it would have to be the binary RPM rather than compiling it.

We love Ruby because it combines the best features of Perl, Python and SmallTalk to provide a very productive/intuitive OO scripting language.


More info on what we'd like to install can be found at:

Home: http://www.ruby-lang.org/en/
Mirror for binary: http://rubyforge.org/frs/?group_id=30
Ruby: http://rubyforge.org/frs/download.php/445/ruby-1.8.1-9.i386.rpm

10-01-2005, 06:06 PM
I have posted a tutorial to set up Ruby on Rails on a Westhost server: http://www.easy-designs.net/articles/WesthostOnRails/

WestHost - BErickson
05-13-2006, 01:46 PM
Ruby will be available next week for automatic installation from within your control panel (site manager).

Note: Because of resource usage, Ruby and FastCGI will not be available on our Personal Basic, Personal Starter, and Business Starter Plans.

07-21-2006, 02:42 PM
How do you go about creating more that one rails app? When I install Ruby with the Site Manager it creates only one site and I can't see how you make another one. I tried through command like (rails application) but nothing, I even just tried to do a simple ruby --version but that comes back with "command not found'. I am confused, are we only able to use this in one site on our VPS? I must be missing something really simple......

01-06-2007, 10:37 AM
I'm really new with rails and enjoy that WH propose Rails in the site manager.
2 points:
- How can I start a new application? Any command in shell won't work.(eg: >rails myapp)
- Can somebody explain what is the right configuration of the httpd.conf?

Thank you

01-09-2007, 11:23 AM
So I think I have discovered how to have more than one Rails application running and figured I would share.

First, if you're having problems running any Ruby commands from SSH, add this line to your .bash_profile in your home directory:

export PATH=$PATH:/usr/local/ruby/bin

Supposedly, when you login through ssh that file should be sourced. For some reason, it is not being sourced for me, so when I log in I type:

source .bash_profile

and then you can run ruby, rails, or rake from any directory.

Now, I was doing the Rolling with Ruby on Rails tutorial (http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html) so I found the directory that Westhost installed rails to and tried to add a rails cookbook application there.

Rails is installed under /var/www so I changed to that directory and ran

rails cookbook

This will create a cookbook directory in /var/www with all of the subdirectories and starting files it needs. However, if you point your browser to yourdomain.com/cookbook/ (notice that the trailing slash is important also) you will get a 404 /trails/ was not found on this server.

So now you want to edit your httpd.conf file which is found in /etc/httpd/conf/. Search that file until you find the original rails setup that Westhost used which should look like this...

Alias /rails/ "/var/www/rails/public/"

<Directory "/var/www/rails/public">
Options ExecCGI FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all

Now, all I did was copy and paste that directly underneath and change rails to cookbook.

You will need to check that you didn't make any syntax mistakes by running

apachectl configtest

and if that says Syntax OK, then run

apachectl graceful

Now, you are almost there. Go to the /var/www/cookbook/public and edit the .htaccess file. Under the line that reads RewriteEngine On add this line

RewriteBase /cookbook

You may also want to look for the rewrite rule that includes dispatch.cgi and change it to dispatch.fcgi. Now if you refresh your browser, you should get the Rails welcome aboard page.

10-12-2007, 07:45 PM
Haven't actually tried this advice yet - but my spidey sense tells me this info will help be get past all the trouble I had today trying to run rails over SSH.