ruby-on-railsrssfeedjira

How to implement an rss feed to a rails application using feedjira


I want to firstly apologize for asking a very similar question to ones that already exist. However, I couldn't quite find the thread and answers I was looking for.

Everywhere I research about implementing an rss feed to a rails application it's in the context of doing the implementation for a blog. I would greatly appreciate any help in learning how to do this outside of this context. I have some ruby experience (mainly writing rspec based test cases) but I have little to no experience using rails and even less web development experience in general.

I would just like to implement the feed on the index page of my rails app. If anyone decides to tackle this question I would appreciate a very step by step tutorial...very granular.


Solution

  • Ended up using the simple-rss and open-uri gems. I created a helper method in my pages controller:

    def feed
      require 'simple-rss'
      require 'open-uri'
    
      @rss = SimpleRSS.parse open('http://url_goes_here')
      @rss = @rss.items
    end
    

    That's the base method. I would recommend windows users of rails to really give simple-rss a shot. I was trying to get the feedjira gem to install and never had any luck.