# How to run .rb file in ruby

**URL:** <https://www.ruby-forum.com/t/how-to-run-rb-file-in-ruby/155678>\
**Category:** Ruby\
**Created:** [December 15, 2008, 3:37pm UTC](https://www.ruby-forum.com/t/how-to-run-rb-file-in-ruby/155678 "2008-12-15T15:37:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sp00nyg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@sp00nyg](https://www.ruby-forum.com/u/sp00nyg)\
**Post date:** [December 15, 2008, 3:37pm UTC](https://www.ruby-forum.com/t/how-to-run-rb-file-in-ruby/155678/1 "2008-12-15T15:37:49Z")

</div>

Hi, we are real noobs and have to program in ruby on rail for a study  
project.

We want ti start a second server (chatserver)

How are we able to run an ruby file ( like in netrail: Run-\>run File) in  
our view or controler??

thank you very much oose2008

---

<div class="post-metadata">

**Author:** ![sp00nyg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@sp00nyg](https://www.ruby-forum.com/u/sp00nyg)\
**Post date:** [December 18, 2008, 6:40am UTC](https://www.ruby-forum.com/t/how-to-run-rb-file-in-ruby/155678/2 "2008-12-18T06:40:51Z")

</div>

Dave D. wrote:

> Hi, we are real noobs and have to program in ruby on rail for a study  
> project.
> 
> We want ti start a second server (chatserver)
> 
> How are we able to run an ruby file ( like in netrail: Run-\>run File) in  
> our view or controler??
> 
> thank you very much oose2008

I believe it’s  
ruby script/runner scriptname  
could ask the rails group, too.  
cheers!  
-=R
