<br>Hi all,<br><br>I tried sending this last week but it never showed up on the list. Resending.. <br>---------- Forwarded message ----------<br><span class="gmail_quote"><br>Date: Apr 27, 2007 11:24 AM<br>Subject: Problem with CC and rails_cron
<br>To: <a href="mailto:cruisecontrolrb-users@rubyforge.org">cruisecontrolrb-users@rubyforge.org</a><br><br></span>Hi everyone,<br><br>I'm having a problem with CC with a plugin that creates its own table in init.rb. I can run rake RAILS_ENV=test db:test:purge;rake RAILS_ENV=test db:migrate; rake test from <crusie_root>/projects/<project_name> without an error. However, I get an error right after the successful migration in the CC
build.log as follows:<br><br>[CruiseControl] Invoking Rake task "test"
/usr/local/bin/ruby18 -Ilib:test
"/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake/rake_test_loader.rb"
"test/unit/ecard_test.rb" "test/unit/color_test.rb"
"test/unit/user_test.rb" "test/unit/common_question_test.rb"
"test/unit/product_test.rb" "test/unit/image_test.rb"
"test/unit/subscription_test.rb" "test/unit/blog_image_test.rb"
"test/unit/post_test.rb" "test/unit/promotion_test.rb"
"test/unit/carrier_test.rb" "test/unit/cart_test.rb"
"test/unit/service_test.rb" "test/unit/offer_test.rb"
"test/unit/comment_test.rb" "test/unit/sku_test.rb"
"test/unit/sms_test.rb" "test/unit/batch_sms_test.rb"
"test/unit/faq_test.rb" "test/unit/blog_comment_test.rb"
"test/unit/line_item_test.rb" "test/unit/job_test.rb"
"test/unit/gateway_subscription_notification_test.rb"
"test/unit/entrant_test.rb" "test/unit/call_test.rb"
"test/unit/order_test.rb" "test/unit/sweepstake_test.rb"
"test/unit/category_test.rb" "test/unit/update_notification_test.rb"
"test/unit/update_email_test.rb" "test/unit/invitation_test.rb"
"test/unit/request_for_notification_test.rb"
"test/unit/related_site_test.rb" <br>-- create_table("rails_crons") <br> ->
0.0048s
<br>-- add_column(:rails_crons, :concurrent, :boolean) <br> -> 0.0232s
<br>/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1789:in
`method_missing': undefined method `concurrent=' for
#<RailsCron:0x983b680> (NoMethodError) from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1510:in
`send' from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1510:in
`attributes=' from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1509:in
`each' from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1509:in
`attributes=' from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1354:in
`initialize_without_callbacks' from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:236:in
`initialize' from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:406:in
`new' from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:406:in
`create' ... 12 levels... from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in
`load' from
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake/rake_test_loader.rb:5
from
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake/rake_test_loader.rb:5:in
`each' from
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake/rake_test_loader.rb:5
/usr/local/bin/ruby18 -Ilib:test
"/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake/rake_test_loader.rb"
"test/functional/landing_controller_test.rb"
"test/functional/store_controller_test.rb"
"test/functional/update_emails_controller_test.rb"
"test/functional/sms_controller_test.rb"
"test/functional/admin_controller_test.rb"
"test/functional/ivr_controller_test.rb" Loaded suite
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake/rake_test_loader
Started<br><br><br>It is worth noting that the rails cron plugin has its own internal migration in its init.rb:<br><br>------- vendor/plugin/rails_cron/init.rb start ------<br>require "rails_cron"<br>require "acts_as_background"
<br>ActiveRecord::Base.send :include, ActsAsBackground<br><br>unless RailsCron.table_exists?<br> ActiveRecord::Schema.create_table(RailsCron.table_name) do |t|<br> t.column :command, :text<br> t.column :start, :integer
<br> t.column :finish, :integer<br> t.column :every, :integer<br> end<br>end<br><br>unless RailsCron.content_columns.map{|a|a.name}.include? "concurrent"<br> ActiveRecord::Schema.add_column :rails_crons, :concurrent, :boolean
<br>end<br>--- end file --<br><br>Any idea why these builds are failing?<br><br>Environment:<br>FreeBSD 6<br>CC 1.1<br>Rails 1.1.6<br><br>Thanks,<br><span class="sg"><br>Mark<br><br><br><br>
</span>