MaurĂcio Linhares wrote: > This custom file should be called scraper.rb and should be placed at > the /lib folder of your application. In a rake task you don't really > access or call controllers, you just run the task, which is telling > the scrapper to load the data and then save it to the DB. >
So, just to make sure I understand correctly.. The scraper.rb file would go in the lib folder and my scraper.rake file would go in the lib\tasks folder? The rake file - would I have to include anything to call that .rb file? I'm sorry if I am misunderstanding this portion of the mechanics. > > You don't need to do anything else, Rails will automatically enable > rubygems and by requiring hpricot you will tell it to load the gem. > Thanks - that part is easy enough. When I go to port my app to my real site, I will have to install hpricot there as well? Or, can I include hpricot in vendor\plugins? > > Now you have to learn the Rails database access framework, > ActiveRecord, you should probably find plenty of material about it. > This is the part that I'm currently studying/reading on and it's wonderful thus far. I just didn't know if the rake task or the ruby file had to communicate with activerecord in a certain way.. i.e. - When I have a controller created it can communicate through the model and access the database. Since the rake and rb file are not part of MVC, I just didn't know if it also used similar mechanics or not. Thanks for the feedback. I'll wait for the reply on the first note to figure it out.. -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

