rails 3.2 with jruby and mysql with rvm in ubuntu
If was trying to migrate one of the app from ruby to jrby to try out the threading benifits.
this wasn't an easy task :D
well the gem dependency did not create a big issue.
the problem came when connecting to mysql with jdbc driver
I had replaced
But it refused to load the driver saying :
"The driver encountered an unknown error: cannot load Java class com.mysql.jdbc.Driver'
I searched but Google could not answer me :(
then I started looking into activerecord-jdbsmysl-adapter gem and came upon the the file
I just copy pasted the code in a application.rb config with a condition if jruby used just after the bundler code
Jdbc::MySQL.load_driver(:require) if Jdbc::MySQL.respond_to?(:load_driver)
and boom it worked...!!!
I don't know why it did not load it even if it was included in Gemfile.
but at last I was able to run the app wit jruby and rails. Woaaahhhh..