# Execute shell command from Rails

**URL:** <https://discuss.rubyonrails.org/t/execute-shell-command-from-rails/7637>\
**Category:** rubyonrails-talk\
**Created:** [January 23, 2007, 10:19am UTC](https://discuss.rubyonrails.org/t/execute-shell-command-from-rails/7637 "2007-01-23T10:19:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chuong\_Huynh](https://avatars.discourse-cdn.com/v4/letter/c/3bc359/32.png) [@Chuong\_Huynh](https://discuss.rubyonrails.org/u/Chuong_Huynh)\
**Post date:** [January 23, 2007, 10:19am UTC](https://discuss.rubyonrails.org/t/execute-shell-command-from-rails/7637/1 "2007-01-23T10:19:03Z")

</div>

Hi all,

Can anyone tell what is the way to execute OS shell command from within Rails programs? I tried to use “exec” but it terminate the console (which run “ruby script/server” originally).

Thank you very much.

- Chuong
