# Executig a script from a page

**URL:** <https://www.ruby-forum.com/t/executig-a-script-from-a-page/119044>\
**Category:** Rails\
**Created:** [November 2, 2007, 2:57pm UTC](https://www.ruby-forum.com/t/executig-a-script-from-a-page/119044 "2007-11-02T14:57:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicpon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/4491bb/32.png) [@nicpon](https://www.ruby-forum.com/u/nicpon)\
**Post date:** [November 2, 2007, 2:57pm UTC](https://www.ruby-forum.com/t/executig-a-script-from-a-page/119044/1 "2007-11-02T14:57:20Z")

</div>

HEy,  
How would you go around putting a link on the rails page to execute a  
ruby script that isn’t in the rails app folder on my development box?  
Any suggestions?

---

<div class="post-metadata">

**Author:** ![nicpon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/4491bb/32.png) [@nicpon](https://www.ruby-forum.com/u/nicpon)\
**Post date:** [November 2, 2007, 3:55pm UTC](https://www.ruby-forum.com/t/executig-a-script-from-a-page/119044/2 "2007-11-02T15:55:26Z")

</div>

Use ActiveMessaging?

---

<div class="post-metadata">

**Author:** ![nicpon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/4491bb/32.png) [@nicpon](https://www.ruby-forum.com/u/nicpon)\
**Post date:** [November 2, 2007, 5:06pm UTC](https://www.ruby-forum.com/t/executig-a-script-from-a-page/119044/3 "2007-11-02T17:06:42Z")

</div>

well why you want to do that…there is always a rails script  
equivalent to ruby…use tht…though i m not 100% sure

---

<div class="post-metadata">

**Author:** ![nicpon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/4491bb/32.png) [@nicpon](https://www.ruby-forum.com/u/nicpon)\
**Post date:** [November 2, 2007, 5:19pm UTC](https://www.ruby-forum.com/t/executig-a-script-from-a-page/119044/4 "2007-11-02T17:19:44Z")

</div>

Dhaval P. wrote:

> well why you want to do that…there is always a rails script  
> equivalent to ruby…use tht…though i m not 100% sure

I have a custom script that does some things on the server and I just  
want to be able to kick it off from rails website.

Here is an example:  
Imagine three components database, rails app and ruby script. Both rails  
and ruby script have connection to the same database and interact with  
it. Now user can only have access to the web app, but can kick off that  
script. If it was a simple script I could have include it with rails  
app, but it more like entire framework and I think it could too messy

---

<div class="post-metadata">

**Author:** ![nicpon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/4491bb/32.png) [@nicpon](https://www.ruby-forum.com/u/nicpon)\
**Post date:** [November 2, 2007, 6:10pm UTC](https://www.ruby-forum.com/t/executig-a-script-from-a-page/119044/5 "2007-11-02T18:10:37Z")

</div>

On 2 Nov 2007, at 16:19, Michal S. wrote:

> rails  
> and ruby script have connection to the same database and interact with  
> it. Now user can only have access to the web app, but can kick off  
> that  
> script. If it was a simple script I could have include it with rails  
> app, but it more like entire framework and I think it could too messy

Well at a basic level you can just fork/exec the other script.

Fred.
