[英]Rake db:migrate syntax error
trying to setup webistrano and getting the following error: 尝试设置webistrano并收到以下错误:
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
Check the ruby syntax for switch-like statments, there is no ":" after the when. 检查ruby语法中是否有类似开关的语句,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.
如果我正确阅读了您的代码,也许您应该看看ordinalize方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.