Displaying 13 results from an estimated 13 matches for "rubyful_soup".
2006 Mar 22
2
RubyGem loading into a controller (High quality question)
INSTALLATION:
Ruby 1.8.2
Rails 1.0.0
rubyful_soup 1.0.4 (GEM)
FACTS:
0) I have successfully installed the rubyful_soup GEM using (I had
previously installed it, which is why the output may look sparse):
C:\ruby>gem install -r rubyful_soup
Attempting remote installation of ''rubyful_soup''
Successfully installed rubyful_soup-1...
2006 Mar 22
2
Successfully importing Rubyful Soup objects
All,
At the top of my controller, I have:
require ''rubygems''
require_gem ''rubyful_soup''
The rubyful_soup gem has been successfully installed.
However, when I go to instantiate a class from it, using
parser = BeautifulSoup.new(html)
I get
uninitialized constant BeautifulSoup
Is there something else I need to do to see the symbols in the Rubyful
Soup gem?
Thanks,
Wes...
2006 Aug 11
2
name conflicts between act_as_taggable and rubyful_soup
both of them use the class called "Tag"
there is a name conflict error when I want to use both of them in rails
how can I solve this error? anybody got some suggestion?
thx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060811/7f09cb14/attachment.html
2006 Jun 25
0
rubyful_soup replace element
Hi,
well, how do i replace an element with rubyful_soup ??
I tried
soup = BeautifulSoup.new(input)
elemnt = soup.find(''quote'')
elemnt = tag(''<div></div>'')
elemnt = ''<div></div>''
elemnt.replaceWith(''<div></div>'')
elemnt = BeautifulSoup.new('...
2006 Jun 23
1
rubyful_soup works fine as an RB file but bugs in Rails
This is the code:
1 require ''rubyful_soup''
2 require ''open-uri''
3
4 url = "http://www.google.com/search?q=ruby"
5 open(url) {
6 |page| page_content = page.read()
7 soup = BeautifulSoup.new(page_content)
8 result = soup.find_all(''a'', :attrs => {''class'' =...
2006 Jul 25
1
RDig document processing error
...rser/query_parser.y:128: warning: method redefined;
discarding old initialize
lib/ferret/query_parser/query_parser.y:157: warning: method redefined;
discarding old parse
lib/ferret/query_parser/query_parser.y:216: warning: method redefined;
discarding old clean_string
/usr/lib/ruby/gems/1.8/gems/rubyful_soup-1.0.4/lib/rubyful_soup.rb:230:
warning: method redefined; discarding old attrs
discovered content extractor class:
RDig::ContentExtractors::PdfContentExtractor
discovered content extractor class:
RDig::ContentExtractors::WordContentExtractor
discovered content extractor class:
RDig::ContentExtr...
2006 May 18
1
Unnecessary Gem modules loaded under Rails 1.1.2
...quires one module from the htmltools gem
(html/sgml-parser).
My app requires the RubyfulSoup gem.
When I started my app, something was causing _another_ module from the
htmltools gem named html/tags.rb to be loaded. This eventually led to a
namespace conflict.
When I made local copies of both rubyful_soup.rb and sgml-parser.rb and
then used only a "require" statement to do the appropriate requiring
(abandoning the Gem framework), the html/tags.rb module was never loaded
(which makes sense, because I couldn''t find a dependency from
html/sgml-parser to html/tags in the first pla...
2007 Jan 21
4
could not install in WinXP
Directory of C:\search_app
01/21/2007 19:37 <DIR> .
01/21/2007 19:37 <DIR> ..
01/21/2007 19:36 427 008 ferret-0.10.13.gem
01/21/2007 19:07 148 992 rdig-0.3.4.gem
2 File(s) 576 000 bytes
2 Dir(s) 45 135 982 592 bytes free
C:\search_app>gem install ferret
Building native extensions. This could
2006 Jun 24
0
superclass mismatch for class Tag (TypeError)
...ustom_require.rb:21:in `require__''
from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require''
from conflict.rb:3
I''ve distilled the offending code down to 3 lines; here are the contents
of my scripts/spider/conflict.rb:
require ''rubyful_soup''
RAILS_ENV = ''development''
require File.dirname(__FILE__) + ''/../../config/environment''
It appears there are two Tag classes. How do I resolve this conflict?
Cheers,
-Jason
--
Posted via http://www.ruby-forum.com/.
2006 Jul 14
2
RDig config file problem
Hi All,
Hope it is ok to post RDig queries on this forum.
Just trying to get RDig working (Ubuntu 6.06, RDig 0.3.0, ferret 0.9.4,
rubyful_soup 1.0.4)
Here is my output:
sh:~/rdigtry$ rdig -c config/rdig_config.rb
discovered content extractor class:
RDig::ContentExtractors::PdfContentExtractor
discovered content extractor class:
RDig::ContentExtractors::WordContentExtractor
discovered content extractor class:
RDig::ContentExtractors::...
2010 Feb 11
1
Model not found in custom script...
...because I think that it doesn''t know where to find my
Category model.
Do you know how I can load or have available the resources/environment
that myrails app uses into this script?
Thanks,
Frank
task_scheduler.rb
=======================
require ''rss''
require ''rubyful_soup''
require ''tmail''
require ''rufus/scheduler''
scheduler = Rufus::Scheduler.start_new
scheduler.every("1m") do
@categories = Category.find(:all)
for category in @categories
rebuild_category_rss_data(category.id)
end
end
================
--...
2007 Jan 23
3
Someone getting RDig work for Linux?
...ag_selector => lambda { |hpricot_doc| ... }
)
# RUBYFUL SOUP
# This is a powerful, but somewhat slow, ruby-only html parsing lib
which was
# RDig''s default html parser up to version 0.3.2. To use it, comment
the
# hpricot config above, and uncomment the following:
#
# :rubyful_soup => OpenStruct.new(
# # provide a method that returns the title of an html document
# # this method may either return a tag to extract the title from,
# # or a ready-to-index string.
# :content_tag_selector => lambda { |tagsoup|
# tagsoup.html.body
# },
# #...
2006 Jun 27
25
1.1.3 available.
Hello,
DHH has just announced the release of Rails 1.1.3
http://weblog.rubyonrails.org/2006/6/27/rails-1-1-3-security-fix-and-minor-fixes
rails-1.1.3
activerecord-1.14.3
actionpack-1.12.2
actionmailer-1.2.2
actionwebservice-1.1.3
The announce without the repetition :)
"Rails 1.1.3: Security fix and minor fixes
Posted by David June 27, 2006 @ 08:07PM
We''ve found and fixed a