Mysql gem failure

This is cross posted from ironruby where I’ve not had any replies.

Installed sequel gem okay but mysql throws up this error when i try to
install.

C:\Documents and Settings\Owner\My Documents\ruby_test\rub
y_test>igem install mysql
Building native extensions. This could take a while…
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

“C:/Program Files/IronRuby 1.1/bin/ir.exe” extconf.rb
extconf.rb:99: syntax error, unexpected end of file, expecting `end’

Gem files will remain installed in C:/Program Files/IronRuby
1.1/Lib/ruby/gems/1
.9.1/gems/mysql-2.8.1 for inspection.
Results logged to C:/Program Files/IronRuby
1.1/Lib/ruby/gems/1.9.1/gems/mysql-2
.8.1/ext/mysql_api/gem_make.out

C:\Documents and Settings\Owner\My Documents\ruby_test\rub
y_test>

I would prefer to use the ruby gems as I’m using ironruby to generate
the GUI front end for data entry.

any help ?

TiA

On Fri, May 20, 2011 at 4:40 AM, Dave L. [email protected] wrote:

.8.1/ext/mysql_api/gem_make.out

C:\Documents and Settings\Owner\My Documents\ruby_test\rub
y_test>

I would prefer to use the ruby gems as I’m using ironruby to generate
the GUI front end for data entry.

any help ?

I don’t think IronRuby supports native extensions, which the mysql gem
uses. You might have to use a .NET library (I’ve never used such a
thing, so I don’t know what to look for, but it’d probably be like
JDBC for Java).

On Fri, May 20, 2011 at 4:40 AM, Dave L. [email protected] wrote:

.8.1/ext/mysql_api/gem_make.out


Posted via http://www.ruby-forum.com/.

It says there is a syntax error, that you have the incorrect number of
ends in the file extconf.rb

Have you checked to make sure that you have an “end” for every “do”,
“def”, “class”, and “if” (and anything else that requires one)?

On Mon, May 23, 2011 at 9:37 AM, Josh C. [email protected]
wrote:

ERROR: Failed to build gem native extension.
1.1/Lib/ruby/gems/1.9.1/gems/mysql-2
TiA
Have you checked to make sure that you have an “end” for every “do”,
“def”, “class”, and “if” (and anything else that requires one)?

Actually, looking again, if this is pulling from rubygems, then I
think the correct gem to install is mysql2
(http://rubygems.org/gems/mysql2) the mysql gem hasn’t been updated in
two years. If you try installing mysql2, do you get the same error?

On May 20, 5:40am, Dave L. [email protected] wrote:

C:\Documents and Settings\Owner\My Documents\ruby_test\rub
y_test>

I would prefer to use the ruby gems as I’m using ironruby to generate
the GUI front end for data entry.

any help ?

mysql or mysql2 gems will not work under IronRuby.

These gems use C code (as Ruby extensions) to communicate with MySQL.

IronRuby can’t compile extensions like this.

Check on IronRuby list for alternate adapters that use C# or managed
code and can be used instead.

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