I've been working on a similar task. It ended up being easier to write the code as a rake task than a standalone ruby file.
As a rake task, you put: desc "Load data into database" task :load_data => :environment do ... into, for example, load_data.rake in lib/tasks. This loads the entire environment correctly for the app. --Matt On Oct 1, 2008, at 10:41 AM, jurgen wrote: > > I am trying to load data from an excel into the database using the > hobo_models. I have no problem doing this with vanilla rails, but with > hobo I don't seem to be able to get past the require's .. > > I try this (adapted to agility): > require "rubygems" > require 'hobofields' > require 'hobosupport' > require 'hobo' > > require "yaml" > require "parseexcel" > > require "project" > require "story" > require "task" > require "task_assignment" > require "user" > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en -~----------~----~----~----~------~----~------~--~---
