From: Venks Date: 2007-12-05T21:41:13+09:00 Subject: Re: Ruby works but not JRuby - when using MySQL Driver Hi, I installed this driver using "gem install mysql". I suppose this will install MySQL/Ruby driver but I need Ruby/MySQL which is pure Ruby MySQL driver. Is that correct? http://dev.mysql.com/downloads/ruby.html On Dec 5, 2007 2:31 AM, Charles Oliver Nutter wrote: > Venks wrote: > > Below is the error while running with JRuby: > > > > connection.rb:4: /usr/lib/ruby/gems/1.8/gems/mysql-2.7/mysql.so:0: > > Invalid char `\177' in expression (SyntaxError) > > from connection.rb:4:in `require' > > from connection.rb:4 > > > > Is this a compatibility issue between JRuby and MySQL driver writting > > in Ruby? Is this expected behaviour or can this be addressed? > > The pure Ruby MySQL driver should be fine, but it looks like you've got > the non-pure-Ruby driver and it's trying to load it. There's a known bug > in JRuby that it will try to load .so files as Ruby source (oops), but > no amount of magic will make it load native extensions (yet). > > Make sure you're using a pure Ruby MySQL driver if you want to access SQL. > > - Charlie > >