Mark Uhrmacher
2007-Apr-27 15:24 UTC
[Cruisecontrolrb-users] Problem with CC and rails_cron
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/20070427/46f34f61/attachment.html
Mark Uhrmacher
2007-May-01 17:30 UTC
[Cruisecontrolrb-users] Fwd: Problem with CC and rails_cron
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
Gedanken
2007-May-01 18:38 UTC
[Cruisecontrolrb-users] Help! Project suddenly running as wrong user
I have two nearly identical projects in cc.rb, and both have been building great for weeks. Yay! Today, i somehow broke one, and I have no idea how. As far as I know: - all files in both cc.rb project directories are owned by ''bob'' - there is no mention of ''root'' anywhere in either tree - cc.rb is running as user ''bob'' But whenever i try to build one of the projects, it runs as user ''root'' and fails. Clicking on the other build button succeeds because it runs as user bob. For the first project, all files (builder.pid, build-75.6 directory etc) are all owned by root, and i have no idea why!!! What is telling cc.rb to make all of these files owned by root?? Teh fact that the second project still builds fine as bob is killing me. -- gedanken
Alexey Verkhovsky
2007-May-01 23:14 UTC
[Cruisecontrolrb-users] Fwd: Problem with CC and rails_cron
I think it did show up the forst time around, but nobody responded because nobody has any idea as to what causes your problem. unless RailsCron.content_columns.map{|a|a.name}.include? "concurrent" ActiveRecord::Schema.add_column :rails_crons, :concurrent, :boolean end -- Alex Verkhovsky CC.rb team "Mark Uhrmacher" <maui at ideeli.com> Sent by: cruisecontrolrb-users-bounces at rubyforge.org 05/01/2007 11:30 AM To cruisecontrolrb-users at rubyforge.org cc Subject [Cruisecontrolrb-users] Fwd: Problem with CC and rails_cron 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 _______________________________________________ Cruisecontrolrb-users mailing list Cruisecontrolrb-users at rubyforge.org http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/cruisecontrolrb-users/attachments/20070501/e072ddc8/attachment.html
Tim Lucas
2007-May-01 23:37 UTC
[Cruisecontrolrb-users] Fwd: Problem with CC and rails_cron
Mark, On 02/05/2007, at 9:14 AM, Alexey Verkhovsky wrote:> unless RailsCron.content_columns.map{|a|a.name}.include? "concurrent" > ActiveRecord::Schema.add_column :rails_crons, :concurrent, :boolean > endThey forgot to reload the column info. Try this: unless RailsCron.content_columns.map{|a|a.name}.include? "concurrent" ActiveRecord::Schema.add_column :rails_crons, :concurrent, :boolean RailsCron.reload_column_information end -- tim
Mark Uhrmacher
2007-May-03 18:53 UTC
[Cruisecontrolrb-users] Fwd: Problem with CC and rails_cron
Hi Everyone, This modification to init.rb worked great! However, there was one problem: the method call should be reset_column_information. Thanks, Mark On 5/1/07, Tim Lucas <t.lucas at toolmantim.com> wrote:> > Mark, > > On 02/05/2007, at 9:14 AM, Alexey Verkhovsky wrote: > > > unless RailsCron.content_columns.map{|a|a.name}.include? "concurrent" > > ActiveRecord::Schema.add_column :rails_crons, :concurrent, :boolean > > end > > They forgot to reload the column info. Try this: > > unless RailsCron.content_columns.map{|a|a.name}.include? "concurrent" > ActiveRecord::Schema.add_column :rails_crons, :concurrent, :boolean > RailsCron.reload_column_information > end > > -- tim > > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/cruisecontrolrb-users/attachments/20070503/6437db0f/attachment.html