Search code examples
sproutcore

Unable to install SproutCore


I used

rvm 1.8.7 do gem install sproutcore 

It was installed successfully, but now on running sproutcore gen project getting_started it gives me the following errors:

/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

Solution

  • I think this is a "known bug" with Ruby 1.8.7 as it's using some syntax that is only available in 1.9.

    You should probably try upgrading to Ruby 1.9.2 or 1.9.3 which should fix the issue.