On Thu, Aug 12, 2010 at 4:39 AM, kristian <[email protected]> wrote:

> as for now you can do the same with JRuby as with MRI - same DM
> configuration. so basically you can choose between Sqlite3, Mysql,
> Postgres (maybe oracle and sqlsercver) but the DM adapter for hsqldb,
> h2, derby do not exist yet though the DataObject drivers are there.
>
> so setup such a database you just need something like:
>
> require 'dm-core'
> DataMapper.setup(:default, "sqlite3:./test.db")
>
> regards Kristian
>
>
Thanks Kristian,
     I did get it to work through trial and error, but oddly I had to stop
using
sqlite3 and go back to sqlite (which I can gem install under jruby).

Information on what is actually supported is sparse to non-existent, that
was
my biggest problem. I couldn't find any information on whether Java
specific DB projects were supported at all under datamapper, or whether
you could get them to work via a JDBC bridge.

There was some information with regards to compiling the support in, but
even
that relates to older versions of DataMapper, and is likely to be invalid
now that
the packages have been restructured with DM 1.0.

Just to be clear, I got my Sinatra app, which used sqlite & DataMapper
running
transparently on MRI & JRuby. So if anyone else is having this problem - it
can
be done, and quite easily too. Its just a documentation issue. The issues
arise due to the complexity of the gem dependency trees. You literally do
not
know what gems to install.

I have been meaning to write up some of these experiences. If I get it down
clear enough, I will post a link, maybe save someone else some time. BTW the
experience is worth it: a nice tidy OS/Ruby VM portable
Rack/Sinatra/DataMapper
stack.

regards,
Richard.


> On Aug 11, 3:06 am, Richard Conroy <[email protected]> wrote:
> > Hi,
> >     I am doing a bit of prototyping with a Sinatra App that uses
> DataMapper
> > (1.0) as the ORM layer.
> >
> > I am just starting out with it, but in development mode I run the app on
> a
> > JRuby container (Trinidad).
> >
> > I am scratching my head here trying to get DataMapper to connect to any
> l, kind
> > of simple local
> > development database (like sqlite3, or any of the JRuby database projects
> > like hsqldb, Derby etc.).
> >
> > Information is very sparse, out of date, or a lot of it applies to
> earlier
> > versions of DataMapper.
> >
> > Whats the state of JRuby support with DataMapper? There seems to be a bit
> of
> > discussion on using
> > it with Google App Engine, but not much else.
> >
> > Whats the simplest way to get a file based DB recognised in DataMapper
> with
> > JRuby?
> >
> > regards,
> > Richard.
> >
> > --http://richardconroy.blogspot.com
>
> --
> 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]<datamapper%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/datamapper?hl=en.
>
>


-- 
http://richardconroy.blogspot.com

-- 
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.

Reply via email to