I want to use the library ''rubyful_soup'' (http://www.crummy.com/software/RubyfulSoup/) Using ''gem install rubyful_soup'' command, I installed the library. The library is installed at /var/lib/gems/1.8/gems/. When I use the library with irb, I typed require ''rubyful_soup.rb'', but got an error message that ruby could not find such a file ''rubyful_soup.rb''. So after googling, I found the solution. The solution was to insert the statement require ''rubygems'' before the statement require ''rubyful_soup.rb''. It works well with irb, but I get an error message when practically using with a controller class in a rails application. Please help =) -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I want to use the library ''rubyful_soup'' (http://www.crummy.com/software/RubyfulSoup/) Using ''gem install rubyful_soup'' command, I installed the library. The library is installed at /var/lib/gems/1.8/gems/. When I use the library with irb, I typed *require ''rubyful_soup.rb'',* but got an error message that ruby could not find such a file ''rubyful_soup.rb''. So after googling, I found the solution. The solution was to insert the statement require ''rubygems'' before the statement require ''rubyful_soup.rb''. It works well with irb, but I get an error message when practically using with a controller class in a rails application. Please help =) -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I want to use the library ''rubyful_soup'' (http://www.crummy.com/software/RubyfulSoup/) Using ''gem install rubyful_soup'' command, I installed the library. The library is installed at /var/lib/gems/1.8/gems/. When I use the library with irb, I typed __require ''rubyful_soup.rb'',__ but got an error message that ruby could not find such a file ''rubyful_soup.rb''. So after googling, I found the solution. The solution was to insert the statement require ''rubygems'' before the statement require ''rubyful_soup.rb''. It works well with irb, but I get an error message when practically using with a controller class in a rails application. Please help =) -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Feb 28, 2007, at 8:41 AM, Yohan Jo wrote:> I want to use the library ''rubyful_soup'' > (http://www.crummy.com/software/RubyfulSoup/) > > Using ''gem install rubyful_soup'' command, I installed the library. > The library is installed at /var/lib/gems/1.8/gems/. > When I use the library with irb, I typed > > __require ''rubyful_soup.rb'',__ > > but got an error message that ruby could not find such a file > ''rubyful_soup.rb''. > So after googling, I found the solution. The solution was to insert > the > statement > > require ''rubygems'' > > before the statement > > require ''rubyful_soup.rb''. > > It works well with irb, but I get an error message when practically > using with a controller class in a rails application. > > Please help =)require ''rubyful_soup'' You don''t use the .rb extension in require statements -- ruby will figure out what kind of file to pull in (i.e., it could be a compiled .so file or a .bundle). You also don''t need to ask you question more than once. There a plenty of people who use the mailing list rather than the forum interface and will see your question no matter where you put it. -Rob Rob Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
First, I''m really sorry for asking one question three times. It is my mistake. Thank you for your answer, but it also works well with irb but not with the individual file of a controller class. Rob Biedenharn wrote:> On Feb 28, 2007, at 8:41 AM, Yohan Jo wrote: >> ''rubyful_soup.rb''. >> It works well with irb, but I get an error message when practically >> using with a controller class in a rails application. >> >> Please help =) > > require ''rubyful_soup'' > > You don''t use the .rb extension in require statements -- ruby will > figure out what kind of file to pull in (i.e., it could be a > compiled .so file or a .bundle). > > You also don''t need to ask you question more than once. There a > plenty of people who use the mailing list rather than the forum > interface and will see your question no matter where you put it. > > -Rob > > Rob Biedenharn http://agileconsultingllc.com > Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org-- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Feb 28, 2007, at 10:01 AM, Yohan Jo wrote:> First, I''m really sorry for asking one question three times. > It is my mistake. > > Thank you for your answer, but it also works well with irb but not > with > the individual file of a controller class.Can you post your error message? You can also try putting the require statement inside your config/environment.rb file. -Rob> Rob Biedenharn wrote: >> On Feb 28, 2007, at 8:41 AM, Yohan Jo wrote: >>> ''rubyful_soup.rb''. >>> It works well with irb, but I get an error message when practically >>> using with a controller class in a rails application. >>> >>> Please help =) >> >> require ''rubyful_soup'' >> >> You don''t use the .rb extension in require statements -- ruby will >> figure out what kind of file to pull in (i.e., it could be a >> compiled .so file or a .bundle). >> >> You also don''t need to ask you question more than once. There a >> plenty of people who use the mailing list rather than the forum >> interface and will see your question no matter where you put it. >> >> -Rob >> >> Rob Biedenharn http://agileconsultingllc.com >> Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I think I found the solution: just rebooting the web server, i.e. webrick. Yohan Jo wrote:> I want to use the library ''rubyful_soup'' > (http://www.crummy.com/software/RubyfulSoup/) > > Using ''gem install rubyful_soup'' command, I installed the library. > The library is installed at /var/lib/gems/1.8/gems/. > When I use the library with irb, I typed > > __require ''rubyful_soup.rb'',__ > > but got an error message that ruby could not find such a file > ''rubyful_soup.rb''. > So after googling, I found the solution. The solution was to insert the > statement > > require ''rubygems'' > > before the statement > > require ''rubyful_soup.rb''. > > It works well with irb, but I get an error message when practically > using with a controller class in a rails application. > > Please help =)-- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rob Biedenharn wrote:> Can you post your error message? You can also try putting the > require statement inside your config/environment.rb file. > > -RobI have solved the problem, so I cannot get the error message. I remember the error message was like, Cannot load such a file ''rubyful_soup'' And I can''t remember the rest. -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---