I have a MySQL table and I want to pick certain columns to create RSS Feed from it. How to do it using Ruby or Rails or Gems?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depending on what I was trying to do, I would probably just go for a simple Ruby script. I would use ActiveRecord so I didn’t have to write any SQL. Then I would use either Builder or RubyRSS to generate the feed.
Connecting ActiveRecord to a MySQL server directly is as simple as:
Then you are free to define ActiveRecord models like you would in a regular Rails app.
There are RSS generator examples on the RubyRSS website and a Builder one on the Railscasts website.