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 class
ActiveRecord::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:in
require’
/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:in
require’
/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:in
require’
/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:in
require’
/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:in
require’
/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:in
require’
/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: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: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:in
instance_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:in
each’
/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:in
initialize’
/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:in
up’
/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:in
call’
/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:in
each’
/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:in
invoke_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:in
invoke_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:in
invoke_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:in
each’
/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:in
standard_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:in
run’
/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:in
run’
/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:in
execute’
/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:in
load’
/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 method
establish_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:in
run_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:in
run_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:in
execute’
/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:in
load’
/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
activerecord-jdbc-adapter-0.9.3-java.patch
--- activerecord-jdbc-adapter-0.9.3-java/lib/active_record/connection_adapters/jdbc_adapter.rb~ 2010-04-03 14:20:10.909805506 +0530
+++ activerecord-jdbc-adapter-0.9.3-java/lib/active_record/connection_adapters/jdbc_adapter.rb 2010-04-03 20:50:20.308164645 +0530
@@ -63,11 +63,13 @@
extend JdbcSpec::ActiveRecordExtensions
- alias :attributes_with_quotes_pre_oracle :attributes_with_quotes
- def attributes_with_quotes(include_primary_key = true, *args) #:nodoc:
- aq = attributes_with_quotes_pre_oracle(include_primary_key, *args)
- if connection.class == ConnectionAdapters::JdbcAdapter && (connection.is_a?(JdbcSpec::Oracle) || connection.is_a?(JdbcSpec::Mimer))
- aq[self.class.primary_key] = "?" if include_primary_key && aq[self.class.primary_key].nil?
This file has been truncated. show original
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
committed 07:10PM - 05 Apr 10 UTC
Merges mkristian's patch from http://gist.github.com/354617
– 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
activerecord-jdbc-adapter-0.9.3-java.patch · GitHub