I performed a gem install feedtools, I then added these 2 lines to my environment.rb: require ''rubygems'' require ''feed_tools'' I then added this method in my controller: def rss @post = Post.most_recent feed = FeedTools::Feed.new feed.title = ''Recent Rambles'' feed.subtitle = ''random thoughts by me'' feed.author.name = "Charlie Bowman" feed.link = "http://www.recentrambles.com/rss" feed.entries << FeedTools::FeedItem.new feed.entries[0].title = @post.title feed.entries[0].link = "http://www.recentrambles.com/pragmatic/view/#{@post.id}" feed.entries[0].content = @post.post # Assumes this is inside a .rxml file feed.build_xml("atom", 1.0, xml) end This causes this error: uninitialized constant FeedTools This error occured while loading the following files: feed_tools.rb What am I forgetting to do? -- Posted via http://www.ruby-forum.com/.
it should be: require_gem ''feedtools'' not require_gem ''feed_tools'' -- Posted via http://www.ruby-forum.com/.
robbie shepherd wrote:> it should be: > require_gem ''feedtools'' > not > require_gem ''feed_tools''Thanks, but that didn''t work. Still the same error -- Posted via http://www.ruby-forum.com/.
> it should be: > > require_gem ''feedtools'' > > not > > require_gem ''feed_tools''require ''feed_tools'' works. require_gem ''feedtools'' also works. His problem is likely an issue with a missing library, likely iconv. -- Cheers, Bob Aman -- AIM: sporkmonger Jabber: sporkmonger@jabber.org
I''ve checked and I do have /usr/lib/ruby/1.8/i386-linux/iconv.so I''m running fedora core 4 Any other ideas. Bob Aman wrote:>> it should be: >> >> require_gem ''feedtools'' >> >> not >> >> require_gem ''feed_tools'' > > require ''feed_tools'' works. > require_gem ''feedtools'' also works. > > His problem is likely an issue with a missing library, likely iconv. > > -- > Cheers, > Bob Aman > -- > AIM: sporkmonger > Jabber: sporkmonger@jabber.org-- Posted via http://www.ruby-forum.com/.
I have also greped my whole rails app directory for RUBYOPT and found nothihg. charlie bowman wrote:> I''ve checked and I do have > /usr/lib/ruby/1.8/i386-linux/iconv.so > > I''m running fedora core 4 > > Any other ideas. > > Bob Aman wrote: >>> it should be: >>> >>> require_gem ''feedtools'' >>> >>> not >>> >>> require_gem ''feed_tools'' >> >> require ''feed_tools'' works. >> require_gem ''feedtools'' also works. >> >> His problem is likely an issue with a missing library, likely iconv. >> >> -- >> Cheers, >> Bob Aman >> -- >> AIM: sporkmonger >> Jabber: sporkmonger@jabber.org-- Posted via http://www.ruby-forum.com/.
I realize this thread is old, but I wonder if this issue was solved (and as of this moment I can''t access the developer''s site). I am having the same problem right now. I am trying to use FeedTools under Locomotive on Mac OS 10.4. I did the gem install via the Locomotive Terminal. Peer charlie bowman wrote:> I have also greped my whole rails app directory for RUBYOPT and found > nothihg. > > > charlie bowman wrote: >> I''ve checked and I do have >> /usr/lib/ruby/1.8/i386-linux/iconv.so >> >> I''m running fedora core 4 >> >> Any other ideas. >> >> Bob Aman wrote: >>>> it should be: >>>> >>>> require_gem ''feedtools'' >>>> >>>> not >>>> >>>> require_gem ''feed_tools'' >>> >>> require ''feed_tools'' works. >>> require_gem ''feedtools'' also works. >>> >>> His problem is likely an issue with a missing library, likely iconv. >>> >>> -- >>> Cheers, >>> Bob Aman >>> -- >>> AIM: sporkmonger >>> Jabber: sporkmonger@jabber.org-- Posted via http://www.ruby-forum.com/.
> I realize this thread is old, but I wonder if this issue was solved (and > as of this moment I can''t access the developer''s site). I am having the > same problem right now. I am trying to use FeedTools under Locomotive > on Mac OS 10.4. I did the gem install via the Locomotive Terminal. > > Peer9/10 times, the problem is caused by iconv. If you can successfully execute: require ''iconv'' Then fine, it''s something else, but there''s a whole host of libraries that FeedTools needs, all of which should be required up at the top of feed_tools.rb. Try requiring each of them until you get one that fails. I should probably try to use a better way of notifying the user which library is missing or broken, but the problem happens infrequently enough that I haven''t gotten around to it. Cheers, Bob Aman -- AIM: sporkmonger Jabber: sporkmonger@jabber.org