Domanda

I have a FeedEntry.rb which has this line in it:

class FeedEntry < ActiveRecord::Base

def self.update_from_feed(feed_url)
feed = Feedzirra::Feed.fetch_and_parse(feed_url)
end

When I try calling FeedEntry.update_from_feed("http://feeds.feedburner.com/railscasts") I get the following error:

NameError - uninitialized constant FeedEntry::Feedzirra:
  activesupport (3.2.14.rc2) lib/active_support/dependencies.rb:520:in `load_missing_constant'
  activesupport (3.2.14.rc2) lib/active_support/dependencies.rb:192:in `block in const_missing'
  activesupport (3.2.14.rc2) lib/active_support/dependencies.rb:190:in `const_missing'
  app/models/feed_entry.rb:5:in `update_from_feed'

I have the gem 'pauldix-feedzirra' in my Gemfile and ran bundle install. I can't figure out why the issue is. Help?

È stato utile?

Soluzione 2

Using gem 'feedzirra' instead of gem 'pauldix-feedzirra' in my Gemfile fixed the issue.

Altri suggerimenti

Try adding this to your model:

require 'feedzirra'
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top