我想尝试一下bourbon sass框架,所以我开始安装它。
因为我想把它和yeoman/angular-generator一起使用,我不得不把Bourbon降级到v3.2.1,把Neat降级到v1.5,以避免编译错误。
降级后没有问题,他们工作得很好。
现在我想添加Bitters,所以,在我运行的文档后面:
$ sudo gem install bitters
作为输出,我得到了预期的
Successfully installed bitters-0.10.0
1 gem installed
Installing ri documentation for bitters-0.10.0...
Installing RDoc documentation for bitters-0.10.0...
,然后我移动到sass文件夹,当我试图运行:
$ bitters install
我得到这个错误输出:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /Library/Ruby/Gems/1.8/gems/bitters-0.10.0/lib/bitters/generator.rb:13: syntax error, unexpected ':', expecting kEND (SyntaxError)
method_options path: :string
^
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/bitters-0.10.0/bin/../lib/bitters.rb:2
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/bitters-0.10.0/bin/bitters:3
from /usr/bin/bitters:19:in `load'
from /usr/bin/bitters:19
我得到相同的运行bitters -v
有办法解决这个问题吗?
谢谢
看起来您使用旧Ruby
版本1.8
,但gem bitters
需要1.9
之后的版本,这表明path: :string
新的哈希语法而不是旧的火箭哈希:path => :string
。更新Ruby
到>= 1.9
.
查看bitters
gem需求:
Ruby 1.9.3 +