# Execute/Run the Ruby (.rb) files from browser

**URL:** <https://www.ruby-forum.com/t/execute-run-the-ruby-rb-files-from-browser/77877>\
**Category:** Ruby\
**Created:** [December 1, 2006, 5:44am UTC](https://www.ruby-forum.com/t/execute-run-the-ruby-rb-files-from-browser/77877 "2006-12-01T05:44:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9f8e36/32.png) [@rajug](https://www.ruby-forum.com/u/rajug)\
**Post date:** [December 1, 2006, 5:44am UTC](https://www.ruby-forum.com/t/execute-run-the-ruby-rb-files-from-browser/77877/1 "2006-12-01T05:44:30Z")

</div>

Hello ruby users,

I am not new at all for ruby because i have studied for a month about  
ruby. Actually i need to create a heatmap (the overlay image that shows  
the click locations in my web page) for my site using ruby on rails  
which i got reference from  
[http://blog.corunet.com/english/the-definitive-heatmap](http://blog.corunet.com/english/the-definitive-heatmap). And i am  
successfull to create heatmap in my local machine. Also i tried  
everything installing (ImageMagick, RMagick, Ruby as well as other  
needed software) and i am success now to create the images using  
RMagick/ImageMagick in the server from COMMAND LINE only. When i run the  
image creating code form command line as ruby something.rb. It reads the  
data from a text file and writes into a file that shows the click maps  
of my site. But when i run this same code from browser from a controller  
class and method, it does not work neither it gives me the error.

And hereby now i want to know how to run or how to call the something.rb  
file which generates the image successfully from command line (SSH in  
PUTTY) from my controller class (calling method). How can we execute  
that .rb file from my ruby code (executing ruby files).

I dont know whether i could make you understood my problem. Please help  
me. I am spending lots of days for this but i could not do.

Thank you very much help in advance.

Raju Gautam  
A New R. Programmer
