Forum: Ruby on Rails error using feedtools

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
73606b1d1042de19056f3d59492b652f?d=identicon&s=25 Charlie Bowman (beachguy82)
on 2006-03-20 03:55
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/#{@pos...
    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?
5a992f256f765f8ee3dbb2af9d3db4e0?d=identicon&s=25 Robbie Shepherd (robbie)
on 2006-03-20 04:02
it should be:

require_gem 'feedtools'

not

require_gem 'feed_tools'
73606b1d1042de19056f3d59492b652f?d=identicon&s=25 Charlie Bowman (beachguy82)
on 2006-03-20 04:10
robbie shepherd wrote:
> it should be:
> require_gem 'feedtools'
> not
> require_gem 'feed_tools'

Thanks, but that didn't work.   Still the same error
784f760ee2b30a896cefabd91cdf0dba?d=identicon&s=25 Bob Aman (Guest)
on 2006-03-20 05:01
(Received via mailing list)
> 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
73606b1d1042de19056f3d59492b652f?d=identicon&s=25 Charlie Bowman (beachguy82)
on 2006-03-20 13:50
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
73606b1d1042de19056f3d59492b652f?d=identicon&s=25 Charlie Bowman (beachguy82)
on 2006-03-20 14:00
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
71b39cce77a48a3f99b4e6a14a656007?d=identicon&s=25 Peer Allan (Guest)
on 2006-04-19 20:15
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
784f760ee2b30a896cefabd91cdf0dba?d=identicon&s=25 Bob Aman (Guest)
on 2006-04-20 03:37
(Received via mailing list)
> 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

9/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
This topic is locked and can not be replied to.