# Trying to get a command line function to work in rails

**URL:** <https://www.ruby-forum.com/t/trying-to-get-a-command-line-function-to-work-in-rails/97337>\
**Category:** Rails\
**Created:** [July 6, 2006, 1:55pm UTC](https://www.ruby-forum.com/t/trying-to-get-a-command-line-function-to-work-in-rails/97337 "2006-07-06T13:55:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![philpeterman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9f8e36/32.png) [@philpeterman](https://www.ruby-forum.com/u/philpeterman)\
**Post date:** [July 6, 2006, 1:55pm UTC](https://www.ruby-forum.com/t/trying-to-get-a-command-line-function-to-work-in-rails/97337/1 "2006-07-06T13:55:36Z")

</div>

Hello all, let me preface by saying that I am a complete neophyte.

I have put together a toy application to monitor the domains that we  
host. It displays basic information about the domain which I pull  
from a database. One of the things that I would like to do is, when  
the user drills down on a particular domain, have the system do a dig  
and display the returned info in the page. I have tried several  
things such as:

def dig  
@dig = `dig @ns2.emarketsouth.com #{domain.domain_name}`  
end

and none of them seem to work. This type of construct does seem to  
work in IRB, but I am obviously missing something. Could someone  
give me a nudge in the right direction?

Phil P.
