List Info

Thread: Problem using Feedtools on my Rails project!




Problem using Feedtools on my Rails project!
user name
2006-07-10 16:24:10
Hi

I'm trying to setup my app to use Feedtools amazing RSS
powers, but it 
fails miserably on the following line:

 logger.debug("Description:#{FeedTools::Feed.open(&qu
ot;http://rss.
slashdot.org/Slashdot/slashdot").items.first.descr
iption}")

The stack trace says:

wrong number of arguments (0 for 1)

/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongr
el/debug.rb:121:in 
`initialize'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongr
el/debug.rb:121:in 
`open'
/usr/local/lib/ruby/gems/1.8/gems/feedtools-0.2.25/lib/feed_
tools/vendor/htree/parse.rb:64:in 
`parse_as'
/usr/local/lib/ruby/gems/1.8/gems/feedtools-0.2.25/lib/feed_
tools/vendor/htree/parse.rb:51:in 
`parse_xml'
/usr/local/lib/ruby/gems/1.8/gems/feedtools-0.2.25/lib/feed_
tools/vendor/htree/fstr.rb:11:in 
`with_frozen_string_hash'
/usr/local/lib/ruby/gems/1.8/gems/feedtools-0.2.25/lib/feed_
tools/vendor/htree/parse.rb:50:in 
`parse_xml'
/usr/local/lib/ruby/gems/1.8/gems/feedtools-0.2.25/lib/feed_
tools/helpers/html_helper.rb:300:in 
`sanitize_html'
/usr/local/lib/ruby/gems/1.8/gems/feedtools-0.2.25/lib/feed_
tools/helpers/html_helper.rb:564:in 
`process_text_construct'
/usr/local/lib/ruby/gems/1.8/gems/feedtools-0.2.25/lib/feed_
tools/feed_item.rb:328:in 
`description'
#/app/controllers/test_controller.rb:4:in
`index'
/usr/local/bin/mongrel_rails:18


I've put the 'require 'feed_tools' line in my
config/environment.rb

BUT the most amazing thing is that I can run script/console
and, lo and 
behold:

>> require 'feed_tools' 
=> false
>> FeedTools::Feed.open("http://rss.
slashdot.org/Slashdot/slashdot").items.first.descr
iption

It works flawlessly!  What gives?


-- 
Posted via http://www.ruby-forum.com
/.
_______________________________________________
Rails mailing list
Railslists.rubyonrails.org
h
ttp://lists.rubyonrails.org/mailman/listinfo/rails
Problem using Feedtools on my Rails project!
user name
2006-07-10 17:08:39
On Mon, 2006-07-10 at 18:24 +0200, dachstein wrote:
> Hi
> 
> I'm trying to setup my app to use Feedtools amazing
RSS powers, but it 
> fails miserably on the following line:
> 
> 
logger.debug("Description:#{FeedTools::Feed.open(&quo
t;http://rss.
slashdot.org/Slashdot/slashdot").items.first.descr
iption}")
> 
> The stack trace says:
> 
> wrong number of arguments (0 for 1)
> 

CRAP!  Damn you Mike C., I *told* you adding that was a bad
idea.  No
cookie for you.

Ok, only Mike will get what I'm talking about, but
basically I goofed
*big* time.  Wait a few minutes because now I have to do a
0.3.13.4
release of Mongrel.

Basically, I threw in request logging at the request of Mike
Clark, who
then promptly didn't need it, but I left it in.  Problem is
the
mongrel/debug.rb file does a lot of nasty stuff and
shouldn't be
included unless explicitly requested and is temporary.  One
of the
things it does is track file opens/closes with Kernel.open
hacks, and
those seem to be messing with the Feedtools *wonderful*
hacks that allow
an open call with no arguments.

Give me an hour.
-- 
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforg
e.org/
http://www.railsmachine.
com/ -- Need Mongrel support?

_______________________________________________
Rails mailing list
Railslists.rubyonrails.org
h
ttp://lists.rubyonrails.org/mailman/listinfo/rails
Problem using Feedtools on my Rails project!
user name
2006-07-10 18:38:55
> Basically, I threw in request logging at the request of
Mike Clark, who
> then promptly didn't need it, but I left it in. 
Problem is the
> mongrel/debug.rb file does a lot of nasty stuff and
shouldn't be
> included unless explicitly requested and is temporary. 
One of the
> things it does is track file opens/closes with
Kernel.open hacks, and
> those seem to be messing with the Feedtools *wonderful*
hacks that allow
> an open call with no arguments.

FeedTools has an open call with no arguments?  Really?  News
to me.

Cheers,
Bob Aman
--
AIM: sporkmonger
Jabber: sporkmongerjabber.org
_______________________________________________
Rails mailing list
Railslists.rubyonrails.org
h
ttp://lists.rubyonrails.org/mailman/listinfo/rails
Problem using Feedtools on my Rails project!
user name
2006-07-10 19:32:02
dachstein wrote:
> Hi
> 
> I'm trying to setup my app to use Feedtools amazing
RSS powers, but it 
> fails miserably on the following line:
> 
>
logger.debug("Description:#{FeedTools::Feed.open(&quo
t;http://rss.
slashdot.org/Slashdot/slashdot").items.first.descr
iption}")
> 
> 
> ...What gives?

Maybe the two nested sets of double quotes? Try changing to
single 
quotes around the URL?

--Al Evans

-- 
Posted via http://www.ruby-forum.com
/.
_______________________________________________
Rails mailing list
Railslists.rubyonrails.org
h
ttp://lists.rubyonrails.org/mailman/listinfo/rails
Problem using Feedtools on my Rails project!
user name
2006-07-10 19:42:32
> Maybe the two nested sets of double quotes? Try
changing to single
> quotes around the URL?

Nah, Zed's analysis is correct.  You'll note that:

"foo #{"bar"} baz"
=> "foo bar baz"

Cheers,
Bob Aman
--
AIM: sporkmonger
Jabber: sporkmongerjabber.org
_______________________________________________
Rails mailing list
Railslists.rubyonrails.org
h
ttp://lists.rubyonrails.org/mailman/listinfo/rails
Problem using Feedtools on my Rails project!
user name
2006-07-11 00:07:11
Bob Aman wrote:

> 
> Nah, Zed's analysis is correct.  You'll note that:
> 
> "foo #{"bar"} baz"
> => "foo bar baz"

Thanks for the info! I guess many years of conditioning
prevented me 
from even trying it

(It still seems insidiously wrong, somehow....)

--Al Evans

-- 
Posted via http://www.ruby-forum.com
/.
_______________________________________________
Rails mailing list
Railslists.rubyonrails.org
h
ttp://lists.rubyonrails.org/mailman/listinfo/rails
Problem using Feedtools on my Rails project!
user name
2006-07-14 08:18:02
> Ok, only Mike will get what I'm talking about, but
basically I goofed
> *big* time.  Wait a few minutes because now I have to
do a 0.3.13.4
> release of Mongrel.

Any updates on this, Zed?   Sorry for nagging again, but I
haven't seen
any 0.3.13.4 release on the Rubyforge page.

-- 
Posted via http://www.ruby-forum.com
/.
_______________________________________________
Rails mailing list
Railslists.rubyonrails.org
h
ttp://lists.rubyonrails.org/mailman/listinfo/rails
Problem using Feedtools on my Rails project!
user name
2006-07-14 12:32:31
On Fri, 2006-07-14 at 10:18 +0200, dachstein wrote:
> > Ok, only Mike will get what I'm talking about,
but basically I goofed
> > *big* time.  Wait a few minutes because now I have
to do a 0.3.13.4
> > release of Mongrel.
> 
> Any updates on this, Zed?   Sorry for nagging again,
but I haven't seen
> any 0.3.13.4 release on the Rubyforge page.
> 

Coming soon.  I've got a pre-release out but it has
problems with Ajax
requests so I'm working on it a bit more.  Probably by this
weekend.


-- 
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforg
e.org/
http://www.railsmachine.
com/ -- Need Mongrel support?

_______________________________________________
Rails mailing list
Railslists.rubyonrails.org
h
ttp://lists.rubyonrails.org/mailman/listinfo/rails
Problem using Feedtools on my Rails project!
user name
2006-07-14 15:29:13
> Coming soon.  I've got a pre-release out but it has
problems with Ajax
> requests so I'm working on it a bit more.  Probably by
this weekend.

Thank you, Zed.  Mongrel rocks!  You rock!


-- 
Posted via http://www.ruby-forum.com
/.
_______________________________________________
Rails mailing list
Railslists.rubyonrails.org
h
ttp://lists.rubyonrails.org/mailman/listinfo/rails
Re: Re: Problem using Feedtools on my Rails project!
user name
2007-01-18 15:55:21
dachstein wrote:
> 
>> Coming soon.  I've got a pre-release out but it has
problems with Ajax
>> requests so I'm working on it a bit more.  Probably
by this weekend.
> 
> Thank you, Zed.  Mongrel rocks!  You rock!

Since this issue keeps coming up, I applied a tiny patch to
the copy of 
HTree included with FeedTools that should prevent the
problem from 
happening.  It's checked into Subversion, but you're not
likely to see a 
release of 0.2.27 anytime soon, so I'm not sure how useful
that will be.

-- 
Posted via http://www.ruby-forum.com
/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talkgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-10]

about | contact  Other archives ( Real Estate discussion Medical topics )