Why am I getting a "uninitialized constant Feed::Feedzirra" error?

1.1k views Asked by At

I'm developing a ruby on rails -v 3.1.3 app that needs to pull a rss feed down. I've successfully installed feedzirra by adding it to my gemfile and running bundle install.

In my controller for the page that will display the rss feed I have

@feed = Feed.new(blog_url_here)

and I have a class named Feed.rb in my models folder that contains this:

def initialize(endpoint)
    atom = Feedzirra::Feed.fetch_and_parse endpoint
    @atom = atom.is_a?(Feedzirra::Parser::Atom) ? atom : nil
end

When I load the page I get an "uninitialized constant Feed::Feedzirra" error. Anyone know why and how I can fix it?

1

There are 1 answers

0
Sergey Alekseev On

Maybe it will help someone:

You should restart rails server after bundle install.