Quantcast
Channel: Active questions tagged feedjira+ruby-on-rails+rss - Stack Overflow
Viewing all articles
Browse latest Browse all 16

Railscasts 168 - Feedjira Not Working

$
0
0

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: http://railscasts.com/episodes/168-feed-parsing

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:

/config/environment.rb:7:in `<top (required)>': undefined local variable or method `config' for main:Object (NameError)

so I left it out.

The FeedEntry console line, in which I pass the url, gives this error: FeedEntry.update_from_feed("feed://seekingalpha.com/market_currents.xml") NameError: uninitialized constant FeedEntry::Feedzirra

And the view code gives this error: wrong number of arguments (1 for 0) with this in the extracted source:

<div class="container-fluid" id="seeking_alpha">
<h3>Seeking Alpha Feed</h3>
<ul class="list-group">
<% for entry in FeedEntry.all(:limit => 10, :order => "published_at desc") %>
  <li class="list-group-item"><%= link_to h(entry.title), entry.url %></li>
<% end %>
</ul>

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.


Viewing all articles
Browse latest Browse all 16

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>