# Integration of rake tasks and shell commands with Rails generators?

**URL:** <https://www.ruby-forum.com/t/integration-of-rake-tasks-and-shell-commands-with-rails-generators/175838>\
**Category:** Rails\
**Created:** [September 21, 2009, 6:59am UTC](https://www.ruby-forum.com/t/integration-of-rake-tasks-and-shell-commands-with-rails-generators/175838 "2009-09-21T06:59:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [September 21, 2009, 6:59am UTC](https://www.ruby-forum.com/t/integration-of-rake-tasks-and-shell-commands-with-rails-generators/175838/1 "2009-09-21T06:59:02Z")

</div>

Just starting to learn about rake and Rails generators… I have a  
couple Qs I have yet to find answers to.

1. Can shell commands somehow be called from a generator’s manifest  
method? If so, is that poor form?
2. Can rake tasks be called from a generator’s manifest method?

Thanks heaps, Elliott

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [September 22, 2009, 4:41pm UTC](https://www.ruby-forum.com/t/integration-of-rake-tasks-and-shell-commands-with-rails-generators/175838/2 "2009-09-22T16:41:29Z")

</div>

Any thoughts on this one?

Thanks, Elliott

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [September 24, 2009, 11:35pm UTC](https://www.ruby-forum.com/t/integration-of-rake-tasks-and-shell-commands-with-rails-generators/175838/3 "2009-09-24T23:35:31Z")

</div>

I found the syntax that makes shell calls from Ruby…

example\_shell\_command = `gem list`  
puts example\_shell\_command

Elliott

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [September 30, 2009, 6:00pm UTC](https://www.ruby-forum.com/t/integration-of-rake-tasks-and-shell-commands-with-rails-generators/175838/4 "2009-09-30T18:00:32Z")

</div>

This was a useful post for me on the topic of Ruby and the shell:  
[http://pasadenarb.com/2007/03/ruby-shell-commands.html](http://pasadenarb.com/2007/03/ruby-shell-commands.html)
