JRuby on Rails without database
I am starting a new Rails project in NetBeans using JRuby (v1.2.0) which uses Rails (2.3.2). I don't need a database, all my data comes from the cloud.
I uncommented this line in my environment
config.frameworks - = [: active_record ,: active_resource ,: action_mailer]
However, I still get the following errors just trying to invoke an action. Hosted by GlassFish.
java.net.SocketException: java.net.ConnectException: Connection refused: connect at com.mysql.jdbc.StandardSocketFactory.connect (StandardSocketFactory.java:156) at com.mysql.jdbc.MysqlIO. (MysqlIO.java:276) at com.mysql.jdbc.Connection.createNewIO (Connection.java:2666) at com.mysql.jdbc.Connection. (Connection.java:1531)
Any ideas where else I might need to change to not use the database? thank
source to share
First step, make sure you don't have any environment overrides in config / environment / [env] .rb
I just checked:
- Create a new rails app
- Change config / environment.rb to uncomment config.frameworks - = [: active_record ,: active_resource,: action_mailer] line
- jruby script / create controller hello index
- jruby script / server
- Point browser to local: 3000 / hi
Everything looks fine - no ActiveRecord error. What about you?
source to share