# Executing ruby script on a Dreamhost account?

**URL:** <https://rubytalk.org/t/executing-ruby-script-on-a-dreamhost-account/42537>\
**Category:** ruby-talk\
**Created:** [27 November 2007 05:48 UTC](https://rubytalk.org/t/executing-ruby-script-on-a-dreamhost-account/42537 "2007-11-27T05:48:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Feng\_Tien](https://avatars.discourse-cdn.com/v4/letter/f/ad7895/32.png) [@Feng\_Tien](https://rubytalk.org/u/Feng_Tien)\
**Post date:** [27 November 2007 05:48 UTC](https://rubytalk.org/t/executing-ruby-script-on-a-dreamhost-account/42537/1 "2007-11-27T05:48:51Z")

</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?

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Feng\_Tien](https://avatars.discourse-cdn.com/v4/letter/f/ad7895/32.png) [@Feng\_Tien](https://rubytalk.org/u/Feng_Tien)\
**Post date:** [27 November 2007 05:55 UTC](https://rubytalk.org/t/executing-ruby-script-on-a-dreamhost-account/42537/2 "2007-11-27T05:55:23Z")

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

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Alex\_Dunae](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@Alex\_Dunae](https://rubytalk.org/u/Alex_Dunae)\
**Post date:** [27 November 2007 17:45 UTC](https://rubytalk.org/t/executing-ruby-script-on-a-dreamhost-account/42537/3 "2007-11-27T17:45:11Z")

</div>

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

&nbsp;&nbsp;cp /usr/bin/eruby /home/username/example.com/eruby.cgi

And update your .htaccess file

&nbsp;&nbsp;Options +ExecCGI  
&nbsp;&nbsp;DirectoryIndex index.rhtml index.html index.htm  
&nbsp;&nbsp;AddHandler rubypage .rhtml  
&nbsp;&nbsp;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/%5C))

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!

> **···**
>
> On Nov 26, 9:48 pm, Feng Tien \<pood.for...@gmail.com\> 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.

---

<div class="post-metadata">

**Author:** ![Peter\_Szinek3](https://avatars.discourse-cdn.com/v4/letter/p/ea5d25/32.png) [@Peter\_Szinek3](https://rubytalk.org/u/Peter_Szinek3)\
**Post date:** [27 November 2007 08:27 UTC](https://rubytalk.org/t/executing-ruby-script-on-a-dreamhost-account/42537/4 "2007-11-27T08:27:41Z")

</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:** ![Feng\_Tien](https://avatars.discourse-cdn.com/v4/letter/f/ad7895/32.png) [@Feng\_Tien](https://rubytalk.org/u/Feng_Tien)\
**Post date:** [27 November 2007 16:45 UTC](https://rubytalk.org/t/executing-ruby-script-on-a-dreamhost-account/42537/5 "2007-11-27T16:45:34Z")

</div>

Peter Szinek 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.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).
