title: Railscasts 168 - Feedjira Not Working
body: <p>I'm trying to make a RoR app that parses an RSS feed then digs through it for keywords. To add RSS I'm following this: <a href="http://railscasts.com/episodes/168-feed-parsing" rel="nofollow">http://railscasts.com/episodes/168-feed-parsing</a></p>
  
  <p>And it's not working. I've installed the gem and rebooted the rails server. The config/environment line prevents rake db:migrate from working, giving this error:</p>
  
  <pre><code>/config/environment.rb:7:in `&lt;top (required)&gt;': undefined local variable or method `config' for main:Object (NameError)
  </code></pre>
  
  <p>so I left it out.</p>
  
  <p>The FeedEntry console line, in which I pass the url, gives this error: <code>FeedEntry.update_from_feed("feed://seekingalpha.com/market_currents.xml")
  NameError: uninitialized constant FeedEntry::Feedzirra</code></p>
  
  <p>And the view code gives this error: <code>wrong number of arguments (1 for 0)</code> with this in the extracted source:</p>
  
  <pre><code>&lt;div class="container-fluid" id="seeking_alpha"&gt;
  &lt;h3&gt;Seeking Alpha Feed&lt;/h3&gt;
  &lt;ul class="list-group"&gt;
  &lt;% for entry in FeedEntry.all(:limit =&gt; 10, :order =&gt; "published_at desc") %&gt;
    &lt;li class="list-group-item"&gt;&lt;%= link_to h(entry.title), entry.url %&gt;&lt;/li&gt;
  &lt;% end %&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Can you help me fix the problems here? Other than being a complete Rails n00b, I'm guessing my problem is that Feedjira isn't initialized, possibly caused by leaving that line out due to using a newer version of Rails (4.0) and Ruby (2.1.1) than the tutorial does. And perhaps the .xml file format on the feed is also causing a problem. It seems like Feedjira just doesn't want to exist outside of its own model. Any ideas would be very appreciated.</p>