使用candy时,active_support依赖项错误

时间:2011-06-03 13:38:47

标签: ruby-on-rails mongodb activesupport candy

当我在Rails项目中使用Candy时,我收到以下错误。真的是语法错误吗?

=> Ctrl-C to shutdown server
Exiting
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require': /home/waleed/.bundler/ruby/1.8/candy-daa2670a71e3/lib/candy/array.rb:56: syntax error, unexpected ':', expecting kEND (SyntaxError)
...lection.find_and_modify query: {"_id" => @__candy_parent.id}...
                              ^
/home/waleed/.bundler/ruby/1.8/candy-daa2670a71e3/lib/candy/array.rb:56: syntax error, unexpected ',', expecting kEND
...{"_id" => @__candy_parent.id}, update: {'$pop' => {@__candy_...
                              ^
/home/waleed/.bundler/ruby/1.8/candy-daa2670a71e3/lib/candy/array.rb:56: syntax error, unexpected ',', expecting kEND
... {@__candy_parent_key => -1}}, new: false
                              ^
  from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:in `new_constants_in'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
  from /home/waleed/.bundler/ruby/1.8/candy-daa2670a71e3/lib/candy/piece.rb:1

任何想法为什么?

1 个答案:

答案 0 :(得分:1)

Per the project's GitHub page,Candy gem仅适用于Ruby 1.9 - 你使用1.8。