ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Mysql2::Error: Unknown column 'users.project_id' (Bug #1214)


Added by Vladislav Poluhin at 2013-01-20 09:16 am. Updated at 2013-01-20 09:16 am.


Status:Open Start date:2013-01-20
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Remote issue URL: Affected version:3.5.1

Description

The error occurs when you press F5 in the browser and do not let a few seconds on the main page:

ActiveRecord::StatementInvalid (Mysql2::Error: Unknown column 'users.project_id' in 'field list': SELECT `news`.`id` AS t0_r0, `news`.`project_id` AS t0_r1, `news`
.`title` AS t0_r2, `news`.`summary` AS t0_r3, `news`.`description` AS t0_r4, `news`.`author_id` AS t0_r5, `news`.`created_on` AS t0_r6, `news`.`comments_count` AS 
t0_r7, `users`.`id` AS t1_r0, `users`.`project_id` AS t1_r1, `users`.`title` AS t1_r2, `users`.`summary` AS t1_r3, `users`.`description` AS t1_r4, `users`.`author_
id` AS t1_r5, `users`.`created_on` AS t1_r6, `users`.`comments_count` AS t1_r7, `projects`.`id` AS t2_r0, `projects`.`name` AS t2_r1, `projects`.`description` AS t
2_r2, `projects`.`homepage` AS t2_r3, `projects`.`is_public` AS t2_r4, `projects`.`parent_id` AS t2_r5, `projects`.`created_on` AS t2_r6, `projects`.`updated_on` A
S t2_r7, `projects`.`identifier` AS t2_r8, `projects`.`status` AS t2_r9, `projects`.`lft` AS t2_r10, `projects`.`rgt` AS t2_r11 FROM `news`  LEFT OUTER JOIN `users
` ON `users`.id = `news`.author_id  LEFT OUTER JOIN `projects` ON `projects`.id = `news`.project_id WHERE (projects.status=1 AND projects.id IN (SELECT em.project_
id FROM enabled_modules em WHERE em.name='news'))  ORDER BY news.created_on DESC LIMIT 5):
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `rescue in log'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract_adapter.rb:204:in `log'
  .rvm/gems/ruby-1.9.3-p0/gems/mysql2-0.2.18/lib/active_record/connection_adapters/mysql2_adapter.rb:265:in `execute'
  .rvm/gems/ruby-1.9.3-p0/gems/mysql2-0.2.18/lib/active_record/connection_adapters/mysql2_adapter.rb:586:in `select'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `block in select_all_with_query_cache'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/query_cache.rb:81:in `cache_sql'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all_with_query_cache'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/associations.rb:1622:in `select_all_rows'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/associations.rb:1401:in `block in find_with_associations'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/associations.rb:1399:in `catch'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/associations.rb:1399:in `find_with_associations'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/base.rb:1580:in `find_every'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/base.rb:619:in `find'
  app/models/news.rb:50:in `latest'
  app/controllers/welcome_controller.rb:19:in `index'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/base.rb:1333:in `perform_action'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/filters.rb:617:in `call_filters'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/filters.rb:638:in `block in run_before_filters'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/filters.rb:189:in `call'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/filters.rb:189:in `call'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/filters.rb:635:in `run_before_filters'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/filters.rb:615:in `call_filters'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/filters.rb:610:in `perform_action_with_filters'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/benchmarking.rb:68:in `block in perform_action_with_benchmark'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/rescue.rb:160:in `perform_action_with_rescue'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/flash.rb:151:in `perform_action_with_flash'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/base.rb:532:in `process'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/filters.rb:606:in `process_with_filters'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/base.rb:391:in `process'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/base.rb:386:in `call'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/routing/route_set.rb:438:in `call'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:87:in `dispatch'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:121:in `_call'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:130:in `block in build_middleware_stack'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/query_cache.rb:29:in `call'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/query_cache.rb:29:in `block in call'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/query_cache.rb:9:in `cache'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/query_cache.rb:28:in `call'
  .rvm/gems/ruby-1.9.3-p0/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/string_coercion.rb:25:in `call'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/params_parser.rb:15:in `call'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/session/cookie_store.rb:99:in `call'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/failsafe.rb:26:in `call'
  <internal:prelude>:10:in `synchronize'
  .rvm/gems/ruby-1.9.3-p0/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:106:in `call'
  .rvm/gems/ruby-1.9.3-p0/gems/rails-2.3.15/lib/rails/rack/static.rb:31:in `call'
  .rvm/gems/ruby-1.9.3-p0/gems/unicorn-4.5.0/lib/unicorn/http_server.rb:552:in `process_client'
  .rvm/gems/ruby-1.9.3-p0/gems/unicorn-4.5.0/lib/unicorn/http_server.rb:628:in `worker_loop'
  .rvm/gems/ruby-1.9.3-p0/gems/unicorn-4.5.0/lib/unicorn/http_server.rb:500:in `spawn_missing_workers'
  .rvm/gems/ruby-1.9.3-p0/gems/unicorn-4.5.0/lib/unicorn/http_server.rb:142:in `start'
  .rvm/gems/ruby-1.9.3-p0/gems/unicorn-4.5.0/bin/unicorn_rails:209:in `<top (required)>'
  .rvm/gems/ruby-1.9.3-p0/bin/unicorn_rails:19:in `load'
  .rvm/gems/ruby-1.9.3-p0/bin/unicorn_rails:19:in `<main>'

Rendering /var/www/dev.u-mind.ru/public/500.html (500 Internal Server Error)

Associated revisions

Revision 3873388f
Added by Jean-Philippe Lang at 2010-01-13 08:29 pm

XML REST API for issues that provides CRUD operations for Issues (#1214).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3310 e93f8b46-1217-0410-a6f0-8f06a7374b81

Revision 34530128
Added by Eric Davis at 2010-06-05 05:52 am

Added JSON support to the issues API. #1214

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3766 e93f8b46-1217-0410-a6f0-8f06a7374b81

History

Also available in: Atom PDF