How do I install gems on JRuby?

How do I install gems on JRuby?
Tried
jgem install mysql
jgem install mysqlplus
and others and I get something like

JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
Building native extensions. This could take a while…
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

c:/jruby-1.5.0.RC1/bin/jruby.exe extconf.rb
WARNING: JRuby does not support native extensions or the mkmf' library. Check http://kenai.com/projects/jruby/pages/Home for alternatives. extconf.rb:20: undefined methodwith_config’ for main:Object
(NoMethodError)

Gem files will remain installed in
c:/jruby-1.5.0.RC1/lib/ruby/gems/1.8/gems/mysqlplus-0.1.1 for
inspection.
Results logged to
C:/jruby-1.5.0.RC1/lib/ruby/gems/1.8/gems/mysqlplus-0.1.1/ext/gem_make.out

On Apr 21, 2010, at 12:59 PM, John B. wrote:

How do I install gems on JRuby?
Tried
jgem install mysql
jgem install mysqlplus

Try:

jruby -S gem install

cr


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

I don’t think John’s problem had to do with issuing the wrong command to
install a gem. Rather, the problem was:

ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

c:/jruby-1.5.0.RC1/bin/jruby.exe extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf’ library.
Check http://kenai.com/projects/jruby/pages/Home
for alternatives.

This error results because the mysql gem contains native extensions and
therefore will not install under JRuby.

If you follow the link as recommended by the error message, and click on
the
“ActiveRecord-JDBC” link, you’ll eventually find that what you need to
do is

jruby -S gem install activerecord-jdbcmysql-adapter

which will install

activerecord-jdbc-adapter
jdbc-mysql
activerecord-jdbcmysql-adapter

P.S. Wasn’t there once a page on the wiki that listed incompatible gems
and
alternatives to them? I don’t see it.

On Wed, Apr 21, 2010 at 9:25 PM, Chuck R. [email protected]
wrote:

cr


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Paul B.
[email protected]

Cyrus Innovation LLC
200 Varick, Suite 902
New York, NY 10014
phone: (212) 647-7186
fax: (212) 591-6043
http://cyrusinnovation.com


Cyrus ranked #231 on the Inc 500 fastest growing companies:
http://www.marketwire.com/press-release/Cyrus-Innovation-Llc-1029552.html

Once there was a site called http://isitjruby.com/ but at the moment it is not working... unfortunately...

Am 22.04.2010 04:15, schrieb Paul B.:
I don't think John's problem had to do with issuing the wrong command to install a gem. Rather, the problem was:

>  ERROR:  Error installing mysql:
>         ERROR: Failed to build gem native extension.

>  c:/jruby-1.5.0.RC1/bin/jruby.exe extconf.rb
>  WARNING: JRuby does not support native extensions or the `mkmf' library.
>          Check http://kenai.com/projects/jruby/pages/Home for alternatives.


This error results because the mysql gem contains native extensions and therefore will not install under JRuby.

If you follow the link as recommended by the error message, and click on the "ActiveRecord-JDBC" link, you'll eventually find that what you need to do is

jruby -S gem install activerecord-jdbcmysql-adapter

which will install

activerecord-jdbc-adapter
jdbc-mysql
activerecord-jdbcmysql-adapter

P.S. Wasn't there once a page on the wiki that listed incompatible gems and alternatives to them? I don't see it.


On Wed, Apr 21, 2010 at 9:25 PM, Chuck R. <[email protected]> wrote:
On Apr 21, 2010, at 12:59 PM, John B. wrote:

> How do I install gems on JRuby?
> Tried
> jgem install mysql
> jgem install mysqlplus

Try:

jruby -S gem install <whatever>

cr


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
Paul B.
[email protected]

Cyrus Innovation LLC
200 Varick, Suite 902
New York, NY 10014
phone: (212) 647-7186
fax: (212) 591-6043
http://cyrusinnovation.com

~~~~~~~~~~~~~~~~~

Cyrus ranked #231 on the Inc 500 fastest growing companies:
http://www.marketwire.com/press-release/Cyrus-Innovation-Llc-1029552.html

~~~~~~~~~~~~~~~~~


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

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