-4

运行 rake 任务时出现语法错误:

 bundle exec rake test:read_message

 ruby -v 
 2.1.0

/ruby/gems/2.1.0/gems/spring-1.7.1/lib/spring/client/run.rb:76: syntax error, unexpected ':', expecting ')' (SyntaxError)
..._env, env.server_command, out: File::NULL)

 /usr/lib/ruby-flo/lib/ruby/gems/2.1.0/gems/spring-1.7.1/lib/spring/client/run.rb:76: syntax error, unexpected ')', expecting kEND
from /usr/lib/ruby-flo/lib/ruby/gems/2.1.0/gems/spring-1.7.1/lib/spring/client.rb:5
from /usr/lib/ruby-flo/lib/ruby/gems/2.1.0/gems/spring-1.7.1/bin/spring:48:in `require'
from /usr/lib/ruby-flo/lib/ruby/gems/2.1.0/gems/spring-1.7.1/bin/spring:48
4

1 回答 1

0

当我禁用弹簧时,能够运行 rake 任务。

DISABLE_SPRING=1 bundle exec rake test:read_message

但不确定问题的根本原因是什么,它在我的本地运行良好,没有禁用弹簧,但在 prod 中没有。

于 2016-06-16T05:29:24.557 回答