Undefined method `attributes_with_quotes' for class `ActiveRecord::Base

Hi,

I am getting following error when I try to run db:migrate

I am using jdbcsqlite3 adapter, I have necessary gems installed.

$ jruby -S rake db:migrate --trace
(in /home/anil/public_html/planetrails.digitalcodes.org/junk)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
undefined method attributes_with_quotes' for classActiveRecord::Base’
/home/anil/.bundle/jruby/1.8/gems/activerecord-jdbc-adapter-0.9.3-java/lib/active_record/connection_adapters/jdbc_adapter.rb:63
/home/anil/.bundle/jruby/1.8/gems/activerecord-jdbc-adapter-0.9.3-java/lib/active_record/connection_adapters/jdbc_adapter.rb:209:in
require' /opt/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta2/lib/active_support/dependencies.rb:209:inrequire’
/opt/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta2/lib/active_support/dependencies.rb:197:in
load_dependency' /opt/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta2/lib/active_support/dependencies.rb:209:inrequire’
/home/anil/.bundle/jruby/1.8/gems/activerecord-jdbc-adapter-0.9.3-java/lib/jdbc_adapter.rb:23
/home/anil/.bundle/jruby/1.8/gems/activerecord-jdbc-adapter-0.9.3-java/lib/jdbc_adapter.rb:209:in
require' /opt/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta2/lib/active_support/dependencies.rb:209:inrequire’
/opt/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta2/lib/active_support/dependencies.rb:197:in
load_dependency' /opt/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta2/lib/active_support/dependencies.rb:209:inrequire’
/home/anil/.bundle/jruby/1.8/gems/activerecord-jdbcsqlite3-adapter-0.9.3-java/lib/active_record/connection_adapters/jdbcsqlite3_adapter.rb:3
/home/anil/.bundle/jruby/1.8/gems/activerecord-jdbcsqlite3-adapter-0.9.3-java/lib/active_record/connection_adapters/jdbcsqlite3_adapter.rb:209:in
require' /opt/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta2/lib/active_support/dependencies.rb:209:inrequire’
/opt/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta2/lib/active_support/dependencies.rb:197:in
load_dependency' /opt/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta2/lib/active_support/dependencies.rb:209:inrequire’
/opt/jruby/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/connection_adapters/abstract/connection_specification.rb:71:in
establish_connection' /opt/jruby/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/connection_adapters/abstract/connection_specification.rb:60:inestablish_connection’
/opt/jruby/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in
establish_connection' /opt/jruby/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/railtie.rb:49 /opt/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta2/lib/active_support/lazy_load_hooks.rb:14:ininstance_eval’
/opt/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta2/lib/active_support/lazy_load_hooks.rb:14:in
run_load_hooks' /opt/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta2/lib/active_support/lazy_load_hooks.rb:14:ineach’
/opt/jruby/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta2/lib/active_support/lazy_load_hooks.rb:14:in
run_load_hooks' /opt/jruby/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/base.rb:2248 /opt/jruby/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/base.rb:455:ininitialize’
/opt/jruby/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/migration.rb:402:in
new' /opt/jruby/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/migration.rb:402:inup’
/opt/jruby/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/migration.rb:387:in
migrate' /opt/jruby/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/railties/databases.rake:146 /opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:incall’
/opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
execute' /opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:ineach’
/opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
execute' /opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:ininvoke_with_call_chain’
/opt/jruby/lib/ruby/1.8/monitor.rb:242:in mon_synchronize' /opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain’
/opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in invoke' /opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task’
/opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level' /opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:ineach’
/opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level' /opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling’
/opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
top_level' /opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:inrun’
/opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' /opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:inrun’
/opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:19:in `load’
/opt/jruby/bin/rake:19

this error disappeared after uninstall and install the
activerecord-jdbc-adapter gem. did not dig further into this. (I try
to get rails 3.0.0.beta2 running - not there yet)

regards Kristian

On Sat, Apr 3, 2010 at 3:48 PM, Anil W. [email protected]
wrote:

rake aborted!
/home/anil/.bundle/jruby/1.8/gems/activerecord-jdbc-adapter-0.9.3-java/lib/jdbc_adapter.rb:23
require' /opt/jruby/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in /opt/jruby/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/base.rb:2248 /opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:inexecute’
/opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:19:inload’
/opt/jruby/bin/rake:19


Anil


Kristian Meier + Saumya Sharma + Sanuka Meier
Vadakkethu House,
Edayanmula West PO - 689532,
Pathanamthitta District, Kerala, INDIA

tel: +91 468 2319577

protect your privacy while searching the net: www.ixquick.com

         _=_
       q(-_-)p
        '_) (_`
        /__/  \
     _(<_   / )_
  (__\_\_|_/__)

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

I am getting exactly the same issue, but reinstalling the
activerecord-jdbc-adapter gem didn’t fix it for me.

I get the same stack trace as above for db:migrate. I also get this
stack trace when trying to run the server:

=> Booting WEBrick
=> Rails 3.0.0.beta2 application starting in development on
http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
C:/Program
Files/JRuby/1.5.0/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta2/lib
/active_record/base.rb:1154:in method_missing': undefined methodestablish_con
nection’ for ActiveRecord::Base:Class (NoMethodError)
from C:/Program
Files/JRuby/1.5.0/lib/ruby/gems/1.8/gems/activerecord-3.
0.0.beta2/lib/active_record/railtie.rb:49
from C:/Program
Files/JRuby/1.5.0/lib/ruby/gems/1.8/gems/activesupport-3
.0.0.beta2/lib/active_support/lazy_load_hooks.rb:14:in instance_eval' from C:/Program Files/JRuby/1.5.0/lib/ruby/gems/1.8/gems/activesupport-3 .0.0.beta2/lib/active_support/lazy_load_hooks.rb:14:inrun_load_hooks’
from C:/Program
Files/JRuby/1.5.0/lib/ruby/gems/1.8/gems/activesupport-3
.0.0.beta2/lib/active_support/lazy_load_hooks.rb:14:in each' from C:/Program Files/JRuby/1.5.0/lib/ruby/gems/1.8/gems/activesupport-3 .0.0.beta2/lib/active_support/lazy_load_hooks.rb:14:inrun_load_hooks’
from C:/Program
Files/JRuby/1.5.0/lib/ruby/gems/1.8/gems/activerecord-3.
0.0.beta2/lib/active_record/base.rb:2248

kristian wrote:

this error disappeared after uninstall and install the
activerecord-jdbc-adapter gem. did not dig further into this. (I try
to get rails 3.0.0.beta2 running - not there yet)

regards Kristian

On Sat, Apr 3, 2010 at 3:48 PM, Anil W. [email protected]
wrote:

rake aborted!
/home/anil/.bundle/jruby/1.8/gems/activerecord-jdbc-adapter-0.9.3-java/lib/jdbc_adapter.rb:23
require' /opt/jruby/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in /opt/jruby/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/base.rb:2248 /opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:inexecute’
/opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /opt/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:19:inload’
/opt/jruby/bin/rake:19


Anil


Kristian Meier + Saumya Sharma + Sanuka Meier
Vadakkethu House,
Edayanmula West PO - 689532,
Pathanamthitta District, Kerala, INDIA

tel: +91 468 2319577

protect your privacy while searching the net: www.ixquick.com

         _=_
       q(-_-)p
        '_) (_`
        /__/  \
     _(<_   / )_
  (__\_\_|_/__)

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

sorry, I in the end I needed to patch for
activerecord-jdbc-adapter-0.9.3-java
http://gist.github.com/354617

the second method missing I never saw.

regards Kristian

On Sat, Apr 3, 2010 at 7:40 PM, Phil O. [email protected]
wrote:

=> Ctrl-C to shutdown server
Files/JRuby/1.5.0/lib/ruby/gems/1.8/gems/activesupport-3
    from C:/Program

On Sat, Apr 3, 2010 at 3:48 PM, Anil W. [email protected]

Pathanamthitta District, Kerala, INDIA
   (__|_/)
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


Kristian Meier + Saumya Sharma + Sanuka Meier
Vadakkethu House,
Edayanmula West PO - 689532,
Pathanamthitta District, Kerala, INDIA

tel: +91 468 2319577

protect your privacy while searching the net: www.ixquick.com

         _=_
       q(-_-)p
        '_) (_`
        /__/  \
     _(<_   / )_
  (__\_\_|_/__)

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Just to note that I had the same experience as both of you on SQLite
and Rails 3 beta 2. It looks like something with Beta 2 release
breaks the jdbcsqlite3 stuff.

Should I open a ticket for this?

–Chris

On Sat, Apr 3, 2010 at 3:24 PM, Phil O. [email protected]
wrote:

activerecord-jdbc-adapter-0.9.3-java


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Looks like Nick S. has fixed this issue in the commit

http://github.com/nicksieger/activerecord-jdbc-adapter/commit/f6118bcadf892d82df8d9681eeb97a1dabfe1a1a

– Anil

Your patched fixed db:migrate for me but I’m still stuck with the
method_missing issue. I’m trying to run mysql and not sqlite tho.

My ruby/rail knowledge doesn’t extend far enough to debug this, I’ll
hope for a patch soon and switch to sqlite for now.

Cheers, Phil

kristian wrote:

sorry, I in the end I needed to patch for
activerecord-jdbc-adapter-0.9.3-java
http://gist.github.com/354617

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