I updated to jruby-1.1.2 and rails 2.1.0 and I started using a different
MySQL5 database then I had been using. But now when I run my migration
or
try to use my simple rails app I get a Table does not exist exception
(posted below)
I’m concerned about the fact that it displays “FORM_FIELDS” in all caps,
since this is mysql the table is in lower case and case sensitive. Is
that
just emphasis placed in the error message or is something converting the
table name to upper case? The migration files show it all in lower
case.
The migration does create the tables properly, I can see them in my
database
but when I try to run my app I get the same error. I tried walking
through
it in debug but the variables all seem correctly set to lower case. I’m
thinking this case problem is a red herring. Does anyone know where
else I
can look.
I’ll also post my database.yml below:
(in /Users/rosey/Projects/Ruby/MiniSURF)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
rake aborted!
Table FORM_FIELDS does not exist
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:69:in
columns_with_query_cache' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/schema_dumper.rb:75:in
table’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/schema_dumper.rb:70:in
tables' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/schema_dumper.rb:61:in
each’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/schema_dumper.rb:61:in
tables' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/schema_dumper.rb:23:in
dump’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/schema_dumper.rb:17:in
dump' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/databases.rake:219:in
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/databases.rake’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/databases.rake:218:in
open' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/databases.rake:218:in
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/databases.rake’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in
call' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in
execute’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in
each' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in
execute’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in
invoke_with_call_chain' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
invoke_with_call_chain’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in
invoke' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/databases.rake:100:in
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/databases.rake’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in
call' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in
execute’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in
each' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in
execute’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in
invoke_with_call_chain' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
invoke_with_call_chain’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in
invoke' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in
invoke_task’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
top_level' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
each’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
top_level' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
standard_exception_handling’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in
top_level' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in
run’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
standard_exception_handling' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in
run’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31:in
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:19:in
load’
/usr/local/ruby/jruby-1.1.2/bin/rake:19
MySQL. Versions 4.1 and 5.0 are recommended.
Install the MySQL driver:
gem install mysql
On Mac OS X:
sudo gem install mysql – --with-mysql-dir=/usr/local/mysql
On Mac OS X Leopard:
sudo env ARCHFLAGS=“-arch i386” gem install mysql –
–with-mysql-config=/usr/local/mysql/bin/mysql_config
This sets the ARCHFLAGS environment variable to your native
architecture
On Windows:
gem install mysql
Choose the win32 build.
Install MySQL and put its /bin directory on your path.
And be sure to use new-style password hashing:
http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: jdbcmysql
driver: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/rubytest
encoding: utf8
username: [deleted]
password: [deleted]
JRuby doesn’t support socket:
host: 127.0.0.1
#socket: /tmp/mysql.sock
Warning: The database defined as ‘test’ will be erased and
re-generated from your development database when you run ‘rake’.
Do not set this db to the same as development or production.
test:
adapter: mysql
encoding: utf8
database: MiniSURF_test
username: root
password:
socket: /tmp/mysql.sock
production:
adapter: mysql
encoding: utf8
database: MiniSURF_production
username: root
password:
socket: /tmp/mysql.sock
–
View this message in context:
http://www.nabble.com/Table-does-not-exist-error-jruby-1.1.2-rails-2.1.0-tp17699124p17699124.html
Sent from the JRuby - User mailing list archive at Nabble.com.
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email