undefined method `true?' for false:FalseClass during rake migration with Derby
------------------------------------------------------------------------------
Key: JRUBY-2612
URL: http://jira.codehaus.org/browse/JRUBY-2612
Project: JRuby
Issue Type: Bug
Components: ActiveRecord-JDBC
Environment: Windows XP SP2
JDK1.6.0_06
JRuby 1.1.2
Gems:
actionmailer (2.1.0)
actionpack (2.1.0)
activerecord (2.1.0)
activerecord-jdbc-adapter (0.8.1)
activerecord-jdbcderby-adapter (0.8.1)
activeresource (2.1.0)
activesupport (2.1.0)
jdbc-derby (10.3.2.1)
jruby-openssl (0.2.3)
mongrel (1.1.5)
rails (2.1.0)
rake (0.8.1)
Reporter: Ka Yick Chua
This error occurs when there is a column option :null => false in the migration
script. It appears the checking of
boolean is incorrect from the stack trace below.
D:\temp\hello>jruby -S rake db:migrate --trace
(in D:/temp/hello)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
undefined method `true?' for false:FalseClass
D:/temp/jruby/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.8.1/lib/jdbc_adapter/jdbc_derby.rb:93:in
`add_column_options!'
D:/temp/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/schema_definitions.rb:268:in
`add_column_options!'
D:/temp/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/schema_definitions.rb:260:in
`to_sql'
D:/temp/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/schema_definitions.rb:464:in
`to_sql'
D:/temp/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/schema_statements.rb:106:in
`create_table'
D:/temp/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/schema_statements.rb:314:in
`initialize_schema_migrations_table'
D:/temp/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:387:in
`initialize'
D:/temp/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:357:in
`new'
D:/temp/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:357:in
`up'
D:/temp/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:340:in
`migrate'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/databases.rake:99:in
`D:/temp/jruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/databases.rake'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in
`invoke_with_call_chain'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
`invoke_with_call_chain'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in
`invoke_task'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
`standard_exception_handling'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
`standard_exception_handling'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31:in
`D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake'
D:/temp/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:19:in `load'
D:/temp/jruby/bin/rake:19
The create_table of the migration script was generated by rake:schema:dump.
class CreateHello < ActiveRecord::Migration
def self.up
create_table "hello", :force => true do |t|
t.integer "notnull", :null => false
t.integer "cannull"
end
end
def self.down
drop_table "hello"
end
end
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email