运行rake db:migrate时出错

时间:2012-12-17 05:47:15

标签: ruby-on-rails

当我尝试使用rake db:migrate:up VERSION = 20121217051908命令错误时,会尝试迁移单个文件。 'rake'不被视为内部或外部命令, 可操作程序或批处理文件。

然后我尝试使用bundle exec rake db:migrate:up VERSION = 20121217051908再次显示错误。

WARNING: 'task :t, arg, :needs => [deps]' is deprecated.  Please use 'task :t, [
args] => [deps]' instead.
    at D:/ROR/appmallserver/lib/tasks/download_apk.rake:5:in `block in <top (req
uired)>'
rake aborted!
D:/ROR/appmallserver/lib/tasks/handster.rake:69: invalid multibyte char (US-ASCI
I)
D:/ROR/appmallserver/lib/tasks/handster.rake:69: invalid multibyte char (US-ASCI
I)
D:/ROR/appmallserver/lib/tasks/handster.rake:69: syntax error, unexpected $end,
expecting keyword_then or ';' or '\n'
            unless node.text == "Next ??"
                                        ^

(通过使用--trace运行任务查看完整跟踪)

1 个答案:

答案 0 :(得分:1)

看起来Ruby正在»窒息。把它放在handster.rake的最顶端:

# encoding: utf-8