0

I have JRuby + Swing application and want to add jdbc/mysql there

require "jdbc/mysql"

But when I'm trying to run it, I have the followig error:

LoadError: no such file to load -- jdbc/mysql
  require at org/jruby/RubyKernel.java:1033
   (root) at olap_frontend.rb:3

My gem list:

*** LOCAL GEMS ***

activerecord-jdbc-adapter (1.2.2)
activerecord-jdbcmysql-adapter (1.2.2)
bouncy-castle-java (1.5.0146.1)
bundler (1.1.3 ruby)
jdbc-mysql (5.1.13)
jruby-launcher (1.0.12 java)
jruby-openssl (0.7.6.1)
rake (0.9.2, 0.8.7)
rubygems-bundler (0.3.0 ruby)

What I'm doing wrong?

2
  • try require "active_record" instead
    – Sully
    Commented Apr 6, 2012 at 18:55
  • LoadError: no such file to load -- active_record require at org/jruby/RubyKernel.java:1033 (root) at olap_frontend.rb:4
    – skayred
    Commented Apr 7, 2012 at 3:10

1 Answer 1

0

It was my fault - I need to require rubygems first

1
  • If anyone happens across this when using Ruby 1.9, this is only an issue in 1.8. 1.9 requires rubygems automatically. Commented Jan 10, 2013 at 23:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.