Still running a simple “smoke test” on building a Rails 3 app using
jRuby 1.6.1 and ar-jdbc 1.1.1 (found here:
Getting Started with Rails — Ruby on Rails Guides)
Created a Rails project. Ran scaffold command and went on to create a
schema and then ran rails db:migrate…
** Execute db:migrate
rake aborted!
Table SCHEMA_MIGRATIONS does not exist
arjdbc/jdbc/RubyJdbcConnection.java:121:in columns' /usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-1.1.1 /lib/arjdbc/db2/adapter.rb:308:in
columns’
/usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/arel-2.0.9/lib/arel/table.rb:97:in
columns' /usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/arel-2.0.9/lib/arel/table.rb:104:in
[]’
/usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/activerecord-3.0.7/lib/active_record/migration.rb:454:in
get_all_versions' /usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/activerecord-3.0.7/lib/active_record/migration.rb:583:in
migrated’
/usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/activerecord-3.0.7/lib/active_record/migration.rb:492:in
current_version' /usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/activerecord-3.0.7/lib/active_record/migration.rb:509:in
migrate’
org/jruby/RubyEnumerable.java:552:in detect' /usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/activerecord-3.0.7/lib/active_record/migration.rb:509:in
migrate’
/usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/activerecord-3.0.7/lib/active_record/migration.rb:433:in
up' /usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/activerecord-3.0.7/lib/active_record/migration.rb:415:in
migrate’
/usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/activerecord-3.0.7/lib/active_record/railties/databases.rake:142:in
(root)' org/jruby/RubyProc.java:260:in
call’
org/jruby/RubyProc.java:228:in call' /usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
execute’
org/jruby/RubyArray.java:1602:in each' /usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
execute’
/usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
invoke_with_call_chain' /usr/local/jruby-1.6.1/lib/ruby/1.8/monitor.rb:191:in
mon_synchronize’
/usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain' /usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
invoke’
/usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
invoke_task' /usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level’
org/jruby/RubyArray.java:1602:in each' /usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level’
/usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling' /usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
top_level’
/usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:inrun' /usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling’
/usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in
run' /usr/local/jruby-1.6.1/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31:in
(root)’
org/jruby/RubyKernel.java:1063:in load' /usr/local/jruby-1.6.1/bin/rake:19:in
(root)’
database.yaml:
development:
username: pete
password: xxxxxxxxx
adapter: jdbc
driver: com.ibm.as400.access.AS400JDBCDriver
url: jdbc:as400://10.0.10.205/blog;naming=sql;
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:
username: pete
password: xxxxxxxxxx
adapter: jdbc
driver: com.ibm.as400.access.AS400JDBCDriver
url: jdbc:as400://10.0.10.205/blog_test;naming=sql;
production:
username: pete
password:xxxxxxxxxxxxxx
adapter: jdbc
driver: com.ibm.as400.access.AS400JDBCDriver
url: jdbc:as400://10.0.10.205/blog_prod;naming=sql;
Looking at the schema contents I CAN see the table. If I drop and
recreate the schema and run the migrate, it will rebuild the
SCHEMA_MIGRATIONS table but still reports it as MIA. I don’t see any
errors at the server side but don’t know where to look next.
Suggestions?
–
Pete H.
Value Added Software, Inc
www.asaap.com
www.opensource4i.com