Sqlite3 in JRuby 1.1.2

I notice that the new release adds support for Sqlite3: “JRUBY-2438
Support
SQLite3 using JRuby”

I’ve tried a few things but can’t seem to get this working. Has anyone
got
some step-by-step instructions?

Thanks…

View this message in context:
http://www.nabble.com/sqlite3-in-JRuby-1.1.2-tp17594237p17594237.html
Sent from the JRuby - User mailing list archive at Nabble.com.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Sun, Jun 1, 2008 at 10:30 PM, rob08 [email protected] wrote:

I notice that the new release adds support for Sqlite3: “JRUBY-2438 Support
SQLite3 using JRuby”

I’ve tried a few things but can’t seem to get this working. Has anyone got
some step-by-step instructions?

Sorry, this is actually in activerecord-jdbc-adapter, not JRuby
proper. Expect a new ar-jdbc release soon, sorry for the delay!

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

That is a shame. Not everyone likes Rails… or ActiveRecord… It’s a
matter of taste, but the real problem here is using “JRuby” as a synonym
for ‘JRuby on Rails’. They are not the same, and we should be very
careful to use proper terminology in the changelog for new releases.

Please don’t take this as a whine, because I am a huge fan of the work
you are doing, Nick, and of the whole team. JRuby is definitely the
future of easy non-Rails R. deployments (because there is no mod_ruby,
only mod_rails). It seems that some improvements are going backwards,
from  Rails-specific to Ruby-general, and I don’t like seeing that.
But I’ll take it as it comes and keep chipping away at getting Waves to
run on JRuby (note, we currently use Sequel and SQLite in the default
config, so a new version of AR is not going to help much in this
regard).

Thanks for all the great work guys!

— On Mon, 6/2/08, Nick S. <[email protected]> wrote:
From: Nick S. <[email protected]>
Subject: Re: [jruby-user] sqlite3 in JRuby 1.1.2
To: [email protected]
Date: Monday, June 2, 2008, 7:12 AM

On Sun, Jun 1, 2008 at 10:30 PM, rob08 <[email protected]>
wrote:
>
> I notice that the new release adds support for Sqlite3: “JRUBY-2438
Support
> SQLite3 using JRuby”
>
> I’ve tried a few things but can’t seem to get this working. Has
anyone got
> some step-by-step instructions?

Sorry, this is actually in activerecord-jdbc-adapter, not JRuby
proper. Expect a new ar-jdbc release soon, sorry for the delay!

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Jun 2, 2008, at 9:25 AM, Ceasless O. wrote:

That is a shame. Not everyone likes Rails… or ActiveRecord…
It’s a matter of taste, but the real problem here is using “JRuby”
as a synonym for ‘JRuby on Rails’. They are not the same, and we
should be very careful to use proper terminology in the changelog
for new releases.

I just wanted to point out that this was not the JRuby team using
improper terminology. Nick was probably too polite to mention it, but
“Support SQLite3 using JRuby” was the title of a bug filed by a member
of the community. The release announcements include the numbers and
titles of the bugs that have been closed for that release. Since that
member of the community also submitted the code to fix it, he gets to
call it whatever he feels like :slight_smile:

:dudley


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Mon, Jun 2, 2008 at 7:25 AM, Ceasless O. [email protected] wrote:

Please don’t take this as a whine, because I am a huge fan of the work you
are doing, Nick, and of the whole team. JRuby is definitely the future of
easy non-Rails R. deployments (because there is no mod_ruby, only
mod_rails). It seems that some improvements are going backwards, from
Rails-specific to Ruby-general, and I don’t like seeing that. But I’ll take
it as it comes and keep chipping away at getting Waves to run on JRuby
(note, we currently use Sequel and SQLite in the default config, so a new
version of AR is not going to help much in this regard).

I see your concern, and it would be nice if we could do things in such
a way that benefits all Ruby applications on JRuby instead of just
Rails, but the reality is that we only have so much time to work on
this stuff (at least I do), and when I have that time I need to either
scratch my own itch or do something that’s useful for me, and that
means Rails these days.

In this case, the Sqlite support was provided by a community member,
Joseph A., so I didn’t actually have anything to do with it. We
love community contributions, of course, right? It’s what makes open
source great and applicable to a wider set of problems. If someone
thinks support for sqlite3-ruby or something similar would be
something cool to work on for JRuby, that sounds like a great side
project to me!

Cheers,
/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Right on. Thanks for clarifying how the naming happened, just a pet
peeve button that gets pressed pretty often. Again, sorry if my message
came off as griping. Clearly it isn’t all up to the core jruby devs to
make sure everything runs, and I didn’t mean to imply your work isn’t
good enough or going in the right direction (which is necessarily your
direction). I really do believe jruby has a very bright future, if not
the brightest.

— On Mon, 6/2/08, Dudley F. <[email protected]> wrote:
From: Dudley F. <[email protected]>
Subject: Re: [jruby-user] sqlite3 in JRuby 1.1.2
To: [email protected]
Date: Monday, June 2, 2008, 5:41 PM

On Jun 2, 2008, at 9:25 AM, Ceasless O. wrote:

> That is a shame. Not everyone likes Rails… or ActiveRecord…
> It’s a matter of taste, but the real problem here is using
“JRuby”
> as a synonym for ‘JRuby on Rails’. They are not the same, and we
> should be very careful to use proper terminology in the changelog
> for new releases.

I just wanted to point out that this was not the JRuby team using
improper terminology. Nick was probably too polite to mention it, but
“Support SQLite3 using JRuby” was the title of a bug filed by a
member
of the community. The release announcements include the numbers and
titles of the bugs that have been closed for that release. Since that
member of the community also submitted the code to fix it, he gets to
call it whatever he feels like :slight_smile:

:dudley


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

I should have named to bug “support SQLite3 Rails adapter” sorry about
that.
As far as the state of the adapter I think describing it as a rough cut
would be pretty generous. Some things will work, but I know date and
datetime columns do not seem to work correctly. I would love to get
some
other people’s input on the adapter. I tried to get the groundwork
laid,
but I’m not really a sqlite expert or very versed in the
activerecordjdbc-adapters.
Joe

A new version in the near future will probably include
support for the
same FFI (Foreign Function Interface) API that Rubinius
ships with. This
would make it possible to essentially “script”
the SQLite library
entirely from within Ruby code. Perhaps this would help
move SQLite3
support forward?

That sounds like a very useful feature. Great to see efforts at
cross-compatability amongst the “upstart” VMs.

As I understand it now, the current sqlite3 gem uses the
Ruby DL
library, which is basically FFI in another form. I started
playing with
adding preliminary DL support, but it’s a rather
cumbersome library. I
think we could get FFI in for a release this summer, making
it possible
to do a sqlite3 look-alike…but we sure would need some
help with that.

Help with the FFI implementation or with the sqlite3-ffi gem? Or both?
:wink:
It seems like something that could end up being pretty diverse in its
approach, since its in the interest of the sqlite3-ruby team, the
rubinius team, and the jruby community.

/me puts on shades. (it’s a bright future, folks)


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Ceasless O. wrote:

Please don’t take this as a whine, because I am a huge fan of the work
you are doing, Nick, and of the whole team. JRuby is definitely the
future of easy non-Rails R. deployments (because there is no mod_ruby,
only mod_rails). It seems that some improvements are going backwards,
from Rails-specific to Ruby-general, and I don’t like seeing that. But
I’ll take it as it comes and keep chipping away at getting Waves to run
on JRuby (note, we currently use Sequel and SQLite in the default
config, so a new version of AR is not going to help much in this regard).

A new version in the near future will probably include support for the
same FFI (Foreign Function Interface) API that Rubinius ships with. This
would make it possible to essentially “script” the SQLite library
entirely from within Ruby code. Perhaps this would help move SQLite3
support forward?

As I understand it now, the current sqlite3 gem uses the Ruby DL
library, which is basically FFI in another form. I started playing with
adding preliminary DL support, but it’s a rather cumbersome library. I
think we could get FFI in for a release this summer, making it possible
to do a sqlite3 look-alike…but we sure would need some help with that.

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Ceasless O. wrote:

Help with the FFI implementation or with the sqlite3-ffi gem? Or both?
:wink:
It seems like something that could end up being pretty diverse in its
approach, since its in the interest of the sqlite3-ruby team, the
rubinius team, and the jruby community.

/me puts on shades. (it’s a bright future, folks)

I tried to figure out how to make sqlite3-ruby work with FFI on JRuby.
Right now I don’t see that it is possible via FFI. FFI does not support
callbacks (see http://pluskid.lifegoo.com/?p=370) but sqlite3 C API
relies on callbacks for the ruby implementation
see(http://klaasprause.com/2008/09/02/jruby-access-to-c-libraries-using-ffi/).

Maybe anyone has an idea how to work around this problem. I am not into
sqlite3 just want to use it with the waves Webframework under jruby.
Maybe the callbacks are not needed, but then somebody with a good
understanding about the sqlite3 API has to help out.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs