我正在尝试使用Feedzirra来解析RSS提要,但我无法同时使用activesupport gem。它告诉我两个版本的activesupport之间存在冲突。我有activesupport(3.2.3)和feedzirra(0.1.3)。
这是我的代码的开头:
require 'rubygems'
require 'simple-rss'
require 'open-uri'
require 'json'
require 'rest-client'
require 'digest/sha1'
require 'mysql2'
require 'active_record'
这是我运行文件时出现的错误。
/Users/fil/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1625:in `raise_if_conflicts': Unable to activate feedzirra-0.1.3, because activesupport-3.2.3 conflicts with activesupport (~> 3.1.1) (Gem::LoadError)
from /Users/fil/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:740:in `activate'
from /Users/fil/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:209:in `rescue in try_activate'
from /Users/fil/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:206:in `try_activate'
from /Users/fil/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:58:in `rescue in require'
from /Users/fil/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from wsj.rb:16:in `<main>'
任何想法如何解决这个问题?真的很想用这个宝石。
答案 0 :(得分:-1)
您似乎已安装Rails(或ActiveSupport 3.2.3)。 Feedzirra依赖于3.1:
https://github.com/pauldix/feedzirra/blob/master/feedzirra.gemspec#L29
如果你还没有使用Bundler,我建议你改用它;)