Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > rakefile gives syntax error, unexpected ':', expecting $end

Reply
Thread Tools

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

 
 
thufir
Guest
Posts: n/a
 
      04-21-2008
I want to make run dependant on the compile and cat tasks, but don't seem
to have the syntax quite correct:

thufir@arrakis:~/foo$
thufir@arrakis:~/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)
thufir@arrakis:~/foo$
thufir@arrakis:~/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
thufir@arrakis:~/foo$



thanks,

Thufir


 
Reply With Quote
 
 
 
 
David A. Black
Guest
Posts: n/a
 
      04-21-2008
Hi --

On Mon, 21 Apr 2008, thufir wrote:

> I want to make run dependant on the compile and cat tasks, but don't seem
> to have the syntax quite correct:
>
> thufir@arrakis:~/foo$
> thufir@arrakis:~/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)
> thufir@arrakis:~/foo$
> thufir@arrakis:~/foo$ cat rakefile.rb
>
>
> task :run => :compile :cat do


Try this:

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


David

--
Rails training from David A. Black and Ruby Power and Light:
INTRO TO RAILS June 9-12 Berlin
ADVANCING WITH RAILS June 16-19 Berlin
INTRO TO RAILS June 24-27 London (Skills Matter)
See http://www.rubypal.com for details and updates!

 
Reply With Quote
 
 
 
 
thufir
Guest
Posts: n/a
 
      04-21-2008
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
parse error, unexpected PORT, expecting OPENPAR or TICK or LSQBRACK krishlal925 VHDL 2 03-31-2011 11:34 PM
syntax error, unexpected '}', expecting kEND Louise Rains Ruby 4 08-11-2010 10:23 PM
genie.rb:20: syntax error, unexpected $end, expecting kEND Alec Williams Ruby 2 07-19-2009 07:30 AM
rakefile help: rakefile calling a rakefile? John Gabriele Ruby 1 12-05-2006 08:04 PM
parse error, unexpected $, expecting kEND Slain Wilde Ruby 1 08-09-2006 03:34 AM



Advertisments