# Rake, Namespaces, and dependencies

**URL:** <https://www.ruby-forum.com/t/rake-namespaces-and-dependencies/76270>\
**Category:** Ruby\
**Created:** [November 17, 2006, 3:36am UTC](https://www.ruby-forum.com/t/rake-namespaces-and-dependencies/76270 "2006-11-17T03:36:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertjames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9c0ed/32.png) [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Post date:** [November 17, 2006, 3:36am UTC](https://www.ruby-forum.com/t/rake-namespaces-and-dependencies/76270/1 "2006-11-17T03:36:54Z")

</div>

I can’t figure out the correct syntax in a Rakefile to say that a  
certain task depends on a task in a different namespace. What is it?

---

<div class="post-metadata">

**Author:** ![robertjames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9c0ed/32.png) [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Post date:** [November 17, 2006, 5:16pm UTC](https://www.ruby-forum.com/t/rake-namespaces-and-dependencies/76270/2 "2006-11-17T17:16:38Z")

</div>

S. Robert J. wrote:

> I can’t figure out the correct syntax in a Rakefile to say that a  
> certain task depends on a task in a different namespace. What is it?

If my question isn’t clear, please let me know. Is there no way to do  
this?

---

<div class="post-metadata">

**Author:** ![robertjames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9c0ed/32.png) [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Post date:** [November 17, 2006, 7:21pm UTC](https://www.ruby-forum.com/t/rake-namespaces-and-dependencies/76270/3 "2006-11-17T19:21:02Z")

</div>

S. Robert J. wrote:

> I can’t figure out the correct syntax in a Rakefile to say that a  
> certain task depends on a task in a different namespace. What is it?

task :ci =\> [:rcov\_params, namespace(:test)[:rcov] ]  
doesn’t work

---

<div class="post-metadata">

**Author:** ![robertjames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9c0ed/32.png) [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Post date:** [November 17, 2006, 7:41pm UTC](https://www.ruby-forum.com/t/rake-namespaces-and-dependencies/76270/4 "2006-11-17T19:41:08Z")

</div>

On Sat, Nov 18, 2006 at 03:20:08AM +0900, S. Robert J. wrote:

> S. Robert J. wrote:
> 
> > I can’t figure out the correct syntax in a Rakefile to say that a  
> > certain task depends on a task in a different namespace. What is it?
> 
> task :ci =\> [:rcov\_params, namespace(:test)[:rcov] ]  
> doesn’t work

$ cat Rakefile  
namespace :foo do  
namespace :bar do  
desc “nested baz”  
task :baz do  
puts “foo:bar:baz”  
end  
end

desc “outer baz”  
task :bar =\> “foo:bar:baz” do  
puts “foo:bar”  
end  
end  
$ rake -T  
(in /home/batsman/mess/2006/46)  
rake foo:bar # outer baz  
rake foo:bar:baz # nested baz  
$ rake foo:bar  
(in /home/batsman/mess/2006/46)  
foo:bar:baz  
foo:bar

---

<div class="post-metadata">

**Author:** ![robertjames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9c0ed/32.png) [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Post date:** [November 17, 2006, 9:01pm UTC](https://www.ruby-forum.com/t/rake-namespaces-and-dependencies/76270/5 "2006-11-17T21:01:21Z")

</div>

Thanks.
