Rakefile gives syntax error, unexpected ':', expecting $end

I want to make run dependant on the compile and cat tasks, but don’t
seem
to have the syntax quite correct:

[email protected]:~/foo$
[email protected]:~/foo$ rake run
(in /home/thufir/foo)
rake aborted!
/home/thufir/foo/rakefile.rb:3: syntax error, unexpected ‘:’, expecting
$end
task :run => :compile :cat do
^

(See full trace by running task with --trace)
[email protected]:~/foo$
[email protected]:~/foo$ cat rakefile.rb

task :run => :compile :cat do
system(“java ArrayOfStrings”)
end

task :cat do
system(“cat ArrayOfStrings.java”)
end

task :compile => :clean do
system(“javac ArrayOfStrings.java”)
end

task :clean do
FileUtils.rm_rf("*.class")
end
[email protected]:~/foo$

thanks,

Thufir

Hi –

On Mon, 21 Apr 2008, thufir wrote:

                  ^

(See full trace by running task with --trace)
[email protected]:~/foo$
[email protected]:~/foo$ cat rakefile.rb

task :run => :compile :cat do

Try this:

task :run => [:compile, :cat] do

David

On Mon, 21 Apr 2008 09:45:05 +0900, David A. Black wrote:

task :run => :compile :cat do

Try this:

task :run => [:compile, :cat] do

Ah, thanks!

-Thufir

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs