我正在为我的购物车使用 spree,我想要多币种支持,所以我在我的 gemfile 中使用下面的 gem
gem "spree_multi_currency", :git => "git://github.com/pronix/spree-multi-currency.git"
比捆绑安装
rake spree_multi_currency:install:migrations
rake db:migrate
然后使用下面的代码加载货币
rake spree_multi_currency:currency:iso4217
现在我想从谷歌加载利率并将美元作为默认货币,我在终端上输入它
rake spree_multi_currency:rates:google[USD]
但它给出了错误
Loads currency data from Google using #<Spree::Currency:0xb967020>
http://www.google.com/ig/calculator?hl=en&q=1INR%3D%3FEUR
rake 中止!757:/home/tps/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/common.rb:155:in parse'
/home/tps/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/common.rb:155:in
parse' /home/tps/ 中的意外令牌。 rvm/gems/ruby-2.0.0-p247/bundler/gems/spree-multi-currency-0abaa72ab8ed/lib/tasks/spree_multi_currency.rake:126:in block (4 levels) in <top (required)>'
/home/tps/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.0.2/lib/active_record/relation/delegation.rb:13:in
each' /home/tps/.rvm/gems/ruby-2.0 .0-p247/gems/activerecord-4.0.2/lib/active_record/relation/delegation.rb:13:ineach'
/home/tps/.rvm/gems/ruby-2.0.0-p247/bundler/gems/spree-multi-currency-0abaa72ab8ed/lib/tasks/spree_multi_currency.rake:122:in
块(3 级)在'/home/tps/.rvm/gems/ruby-2.0.0-p247 /bin/ruby_executable_hooks:15:in eval'
/home/tps/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in
'Tasks: TOP => spree_multi_currency:rates:google(通过使用 --trace 运行任务查看完整跟踪)
我想为我的购物车提供多币种支持,请帮忙。
提前致谢