# How can i execute a command from a ruby class file

**URL:** <https://www.ruby-forum.com/t/how-can-i-execute-a-command-from-a-ruby-class-file/132087>\
**Category:** Ruby\
**Created:** [March 16, 2008, 7:15pm UTC](https://www.ruby-forum.com/t/how-can-i-execute-a-command-from-a-ruby-class-file/132087 "2008-03-16T19:15:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![barakathullah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9dc877/32.png) [@barakathullah](https://www.ruby-forum.com/u/barakathullah)\
**Post date:** [March 16, 2008, 7:15pm UTC](https://www.ruby-forum.com/t/how-can-i-execute-a-command-from-a-ruby-class-file/132087/1 "2008-03-16T19:15:28Z")

</div>

Hi,

I am using ffmpeg plugin to convert one mime type into another mime  
type. It works fine when i execute it directly in the command prompt by  
typing the command. But thats not my requirement. I want to run that  
command from a ruby class file. first i should call that ruby file. then  
from there i should automatically execute that command. Can anyone get  
me a solution for this.

thanks,

with regards,  
barak

---

<div class="post-metadata">

**Author:** ![barakathullah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9dc877/32.png) [@barakathullah](https://www.ruby-forum.com/u/barakathullah)\
**Post date:** [March 16, 2008, 7:38pm UTC](https://www.ruby-forum.com/t/how-can-i-execute-a-command-from-a-ruby-class-file/132087/2 "2008-03-16T19:38:08Z")

</div>

Barak I. wrote:

> I want to run that  
> command from a ruby class file.

[http://groups.google.com/group/comp.lang.ruby/msg/b0b176c3ac742261](http://groups.google.com/group/comp.lang.ruby/msg/b0b176c3ac742261)

HTH,  
Sebastian
