2010-09-22 5 views
0

essayant de Webistrano d'installation et d'obtenir l'erreur suivante:rake db: migrate erreur de syntaxe

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 

Répondre

2

Vérifiez la syntaxe rubis pour statments de commutation comme, il n'y a pas « : » après quand.

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

Sur une note de côté, pourquoi essayez-vous de faire comme ça? Si j'ai lu votre code correctement, peut-être que vous devriez jeter un oeil à la méthode ordinalize.

Questions connexes