[Cruisecontrolrb-users] Fwd: Problem with CC and rails_cron
Mark Uhrmacher
maui at ideeli.com
Tue May 1 13:30:32 EDT 2007
Hi all,
I tried sending this last week but it never showed up on the list.
Resending..
---------- Forwarded message ----------
Date: Apr 27, 2007 11:24 AM
Subject: Problem with CC and rails_cron
To: cruisecontrolrb-users at rubyforge.org
Hi everyone,
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:
[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"
-- create_table("rails_crons")
-> 0.0048s
-- add_column(:rails_crons, :concurrent, :boolean)
-> 0.0232s
/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
It is worth noting that the rails cron plugin has its own internal migration
in its init.rb:
------- vendor/plugin/rails_cron/init.rb start ------
require "rails_cron"
require "acts_as_background"
ActiveRecord::Base.send :include, ActsAsBackground
unless RailsCron.table_exists?
ActiveRecord::Schema.create_table(RailsCron.table_name) do |t|
t.column :command, :text
t.column :start, :integer
t.column :finish, :integer
t.column :every, :integer
end
end
unless RailsCron.content_columns.map{|a|a.name}.include? "concurrent"
ActiveRecord::Schema.add_column :rails_crons, :concurrent, :boolean
end
--- end file --
Any idea why these builds are failing?
Environment:
FreeBSD 6
CC 1.1
Rails 1.1.6
Thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/cruisecontrolrb-users/attachments/20070501/32222d3b/attachment-0001.html
More information about the Cruisecontrolrb-users
mailing list