views:

33

answers:

1

trying to setup webistrano and getting the following error:

rake db:migrate

(in /var/www/html/webistrano)
rake aborted!
/var/www/html/webistrano/vendor/rails/activesupport/lib/active_support/inflector.rb:273: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n'
        when 1: "#{number}st"
               ^
/var/www/html/webistrano/vendor/rails/activesupport/lib/active_support/inflector.rb:274: syntax error, unexpected keyword_when, expecting keyword_end
        when 2: "#{number}nd"
            ^
/var/www/html/webistrano/vendor/rails/activesupport/lib/active_support/inflector.rb:275: syntax error, unexpected keyword_when, expecting keyword_end
        when 3: "#{number}rd"
            ^
/var/www/html/webistrano/vendor/rails/activesupport/lib/active_support/inflector.rb:280: syntax error, unexpected keyword_end, expecting $end
+1  A: 

Check the ruby syntax for switch-like statments, there is no ":" after the when.

case foo
  when "bar"
    # do stuff
  when "bar2"
    # do other stuff
end

On a side note, why are you trying to do it like this? If I read your code correctly, maybe you should take a look at the ordinalize method.

Faisal