Thanks again Richard. For the time being I'm going to just use a database file, but could you help me out with a couple of things?
1) How do you export DM logs to the console? 2) Could you give me an example of a rescue block - I'm not really used to using them... cheers, DAZ On Oct 24, 5:03 pm, Richard Conroy <[email protected]> wrote: > On Sun, Oct 24, 2010 at 4:54 PM, DAZ <[email protected]> wrote: > > Hi Richard, > > > Thanks for the quick reply. I think I am calling things in the right > > order - it certainly works if I use an actual database file instead. > > This is what I have at the moment: > > DataMapper.setup(:default, ENV['DATABASE_URL'] || "sqlite3::memory:") > > class Page > > include DataMapper::Resource > > property :id, Serial > > property :title, String, :required => true > > end > > DataMapper.auto_upgrade! > > > Is there anything wrong there? > > Looks OK to me. I often find it useful to export DM logs to the console (you > can see the schema being made then, and all the SQL statements). DataMapper > sits on a pretty big stack of dependencies, and the problems often arise > there. I notice it a lot, when I move between environments (e.g. Ubuntu <-> > Windows <-> JRuby) for example. You really need to be using rescue blocks a > lot to isolate the initial problems. > > --http://richardconroy.blogspot.com|http://twitter.com/RichardConroy -- You received this message because you are subscribed to the Google Groups "DataMapper" 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/datamapper?hl=en.
