# Executing ruby script on a Dreamhost account?

**URL:** <https://www.ruby-forum.com/t/executing-ruby-script-on-a-dreamhost-account/121354>\
**Category:** Ruby\
**Created:** [November 27, 2007, 6:48am UTC](https://www.ruby-forum.com/t/executing-ruby-script-on-a-dreamhost-account/121354 "2007-11-27T06:48:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3bc359/32.png) [@pood](https://www.ruby-forum.com/u/pood)\
**Post date:** [November 27, 2007, 6:48am UTC](https://www.ruby-forum.com/t/executing-ruby-script-on-a-dreamhost-account/121354/1 "2007-11-27T06:48:54Z")

</div>

So far, from what I’ve read, I should use eRuby if I want to execute my  
program online.

I’ve got Dreamhost and I know they have RoR support.

There’s a couple libraries I’m using, how do I install these libraries  
online?

---

<div class="post-metadata">

**Author:** ![pood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3bc359/32.png) [@pood](https://www.ruby-forum.com/u/pood)\
**Post date:** [November 27, 2007, 6:55am UTC](https://www.ruby-forum.com/t/executing-ruby-script-on-a-dreamhost-account/121354/2 "2007-11-27T06:55:26Z")

</div>

Also forgot to ask, would executing ruby code online be easier with  
Rails?

I’ve built a program for work and I’d like to make this avaliable for my  
co-workers without them having to configure a ruby install and running  
thru command line.

It scraps a few pieces of data off of google and then outputs it to an  
xml. I’m sure I can figure out how to program it so it outputs an html  
file.

What I’d really like to do is:

Have a simple page, user pastes in a list of urls in a input box. when  
they submit…

My program will grab each url one by one and run my scraper method with  
the url and it will output an html file.

---

<div class="post-metadata">

**Author:** ![pood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3bc359/32.png) [@pood](https://www.ruby-forum.com/u/pood)\
**Post date:** [November 27, 2007, 9:28am UTC](https://www.ruby-forum.com/t/executing-ruby-script-on-a-dreamhost-account/121354/3 "2007-11-27T09:28:38Z")

</div>

Hi Feng,

> My program will grab each url one by one and run my scraper method with  
> the url and it will output an html file.

Isn’t that scRUBYt! by any chance? 🙂 Well, it doesn’t matter whether  
it’s scRUBYt!, a Hpricot script or whatever similar, your process will  
be kicked to death really fast - or at least that was the situation when  
I last tried. Maybe they improved their policies somewhat - however I  
doubt that dream would be usable for these kind of things even after  
that.

Your best shot is slicehost - it’s cheap, fast, easy to setup, great  
support and no nagging. Dreamhost is great for blogs, gallery, wikis and  
that sort of stuff (apart from the ocassional screwups and slowdowns).  
However, hands off if you are trying to run a Ruby script there (unless  
it’s Rails or something they accept).

Just my 2c… let me know if you have a different experience.

Cheers,  
Peter

* * *

[http://www.rubyrailways.com](http://www.rubyrailways.com)  
[http://scrubyt.org](http://scrubyt.org)

---

<div class="post-metadata">

**Author:** ![pood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3bc359/32.png) [@pood](https://www.ruby-forum.com/u/pood)\
**Post date:** [November 27, 2007, 5:45pm UTC](https://www.ruby-forum.com/t/executing-ruby-script-on-a-dreamhost-account/121354/4 "2007-11-27T17:45:35Z")

</div>

Peter S. wrote:

> Hi Feng,
> 
> > My program will grab each url one by one and run my scraper method with  
> > the url and it will output an html file.
> 
> Isn’t that scRUBYt! by any chance? 🙂 Well, it doesn’t matter whether  
> it’s scRUBYt!, a Hpricot script or whatever similar, your process will  
> be kicked to death really fast - or at least that was the situation when  
> I last tried. Maybe they improved their policies somewhat - however I  
> doubt that dream would be usable for these kind of things even after  
> that.
> 
> Your best shot is slicehost - it’s cheap, fast, easy to setup, great  
> support and no nagging. Dreamhost is great for blogs, gallery, wikis and  
> that sort of stuff (apart from the ocassional screwups and slowdowns).  
> However, hands off if you are trying to run a Ruby script there (unless  
> it’s Rails or something they accept).
> 
> Just my 2c… let me know if you have a different experience.
> 
> Cheers,  
> Peter
> 
> * * *
> 
> [http://www.rubyrailways.com](http://www.rubyrailways.com)  
> [http://scrubyt.org](http://scrubyt.org)

yup, it’s Scrubyt;)

Would this work better with Rails? I have an dedicated box I have access  
to.

---

<div class="post-metadata">

**Author:** ![pood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3bc359/32.png) [@pood](https://www.ruby-forum.com/u/pood)\
**Post date:** [November 27, 2007, 6:46pm UTC](https://www.ruby-forum.com/t/executing-ruby-script-on-a-dreamhost-account/121354/5 "2007-11-27T18:46:07Z")

</div>

On Nov 26, 9:48 pm, Feng T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> So far, from what I’ve read, I should use eRuby if I want to execute my  
> program online.
> 
> I’ve got Dreamhost and I know they have RoR support.

I use eRuby to power a Ruby script on Dreamhost and it works  
beautifully (and very quickly).

To get eRuby up and running, login to your shell account, copy DH’s  
precompiled eRuby to your www directory

cp /usr/bin/eruby /home/username/example.com/eruby.cgi

And update your .htaccess file

Options +ExecCGI  
DirectoryIndex index.rhtml index.html index.htm  
AddHandler rubypage .rhtml  
Action rubypage /eruby.cgi

(You can see my implementation at  
[http://code.dunae.ca/svn/premailer/tags/1.4/www/](http://code.dunae.ca/svn/premailer/tags/1.4/www/))

I also run two Rails sites on Dreamhost. They’ve been very  
problematic, though they seem to have been more stable since around  
August. If you can get away with eRuby instead of Rails I would  
strongly suggest it.

Good luck!
