2012-07-20 60 views
0

我用无法安装SproutCore的

rvm 1.8.7 do gem install sproutcore 

它已成功安装,但现在运行sproutcore gen project getting_started 它给了我下面的错误:

/Users/user/.rvm/gems/ruby-1.8.7-p370/gems/sproutcore-1.8.2.1/vendor/chance/lib/chance/instance/slicing.rb:22: syntax error, unexpected ':', expecting '}' 
      mtime: file[:mtime], 
       ^
/Users/user/.rvm/gems/ruby-1.8.7-p370/gems/sproutcore-1.8.2.1/vendor/chance/lib/chance/instance/slicing.rb:23: syntax error, unexpected ':', expecting '=' 
      canvas: canvas 
       ^
/Users/user/.rvm/gems/ruby-1.8.7-p370/gems/sproutcore-1.8.2.1/vendor/chance/lib/chance/instance/slicing.rb:234: syntax error, unexpected $end, expecting kEND 

回答

0

我认为这是一个“已知的错误”使用Ruby 1.8.7,因为它使用了一些仅在1.9中可用的语法。

您应该尝试升级到Ruby 1.9.2或1.9.3来解决问题。

0

我同意Topher Fangio,但补充说明:这就是我所做的。

gem update --system