Project

General

Profile

SVN Access

Added by Alexey Chepurnykh over 15 years ago

After one of recent redmine updates I get an error when I click on Repository link.

Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your redMine administrator for assistance.
Back

In production.log I have:

 Processing RepositoriesController#show (for 51.6.145.135 at 2008-11-19 12:13:50) [GET]
  Session ID: eef91ace1e571a4880ac01c170de3bb0
  Parameters: {"action"=>"show", "id"=>"reportengine", "controller"=>"repositories"}

 NoMethodError (undefined method `user_id' for #<Changeset:0x2b935e538b40>):
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/attribute_methods.rb:256:in `method_missing'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/association_preload.rb:215:in `send'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/association_preload.rb:215:in  `preload_belongs_to_association'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/association_preload.rb:214:in `each'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/association_preload.rb:214:in  `preload_belongs_to_association'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/association_preload.rb:40:in `send'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/association_preload.rb:40:in `preload_one_association'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/association_preload.rb:38:in `each'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/association_preload.rb:38:in `preload_one_association'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/association_preload.rb:17:in `preload_associations'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/association_preload.rb:16:in `preload_associations'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/association_preload.rb:16:in `each'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/association_preload.rb:16:in `preload_associations'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1343:in `find_every'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1303:in `find_initial'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:534:in `find'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations/association_collection.rb:47:in `find'
    /app/models/repository.rb:126:in `find_committer_user'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations/association_proxy.rb:177:in `send'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations/association_proxy.rb:177:in `method_missing'
    /app/models/changeset.rb:65:in `before_create'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/callbacks.rb:301:in `send'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/callbacks.rb:301:in `callback'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/callbacks.rb:219:in `create_without_timestamps'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/timestamp.rb:29:in `create'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2472:in `create_or_update_without_callbacks'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/callbacks.rb:207:in `create_or_update'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2200:in `save_without_validation'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/validations.rb:901:in `save_without_dirty'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/dirty.rb:75:in `save_without_transactions'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:106:in `save'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:79:in `transaction'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:98:in `transaction'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:106:in `save'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:118:in `rollback_active_record_state!'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:106:in `save'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:640:in `create'
    /app/models/repository/subversion.rb:59:in `fetch_changesets'
    /app/models/repository/subversion.rb:58:in `reverse_each'
    /app/models/repository/subversion.rb:58:in `fetch_changesets'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:79:in `transaction'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:98:in `transaction'
    /app/models/repository/subversion.rb:57:in `fetch_changesets'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations/association_proxy.rb:177:in `send'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations/association_proxy.rb:177:in `method_missing'
    /app/controllers/repositories_controller.rb:68:in `show'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in `send'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in `perform_action_without_filters'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:580:in `call_filters'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:573:in `perform_action_without_benchmark'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
    /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:201:in `perform_action_without_caching'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:13:in `perform_action'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
    /usr/lib64/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in `cache'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:12:in `perform_action'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `send'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `process_without_filters'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:in `process_without_session_management_support'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in `process'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:in `process'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:149:in `handle_request'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in `dispatch'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in `synchronize'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in `dispatch'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:in `dispatch'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in `process'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `synchronize'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `process'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in `process_client'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `each'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `process_client'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `initialize'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `new'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `initialize'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `new'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `run'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in `run'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `each'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `run'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
    /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
    /usr/bin/mongrel_rails:19:in `load'
    /usr/bin/mongrel_rails:19

 Rendering /home/redmine/redmine/public/500.html (500 Internal Server Error)

The redmine app is deployed on CentOS-5.2

$ ruby -v
ruby 1.8.5 (2006-08-25) [x86_64-linux]

$ rails -v
Rails 2.1.0

$ gem -v
1.2.0


Replies (5)

RE: SVN Access - Added by Alexey Chepurnykh over 15 years ago

I forgot to do

rake db:migrate_plugins

RE: SVN Access - Added by Alexey Chepurnykh over 15 years ago

Alex Chep wrote:

I forgot to do

rake db:migrate_plugins

rake db:migrate

RE: SVN Access - Added by Rafal W. about 15 years ago

I've got the same problem.

Where should I run this command?

redmine@ [~/]# rake db:migrate
(in /home/redmine/public_html)
rake aborted!
#28000Access denied for user 'root'@'localhost' (using password: NO)
(See full trace by running task with --trace)

I've tried from redmine and root account as well, the same error (I've got not password for root)
What's are requirements?

Even it will work, if I've got working Redmine over couple of months, it will not delete any data after this command?

RE: SVN Access - Added by Rafal W. about 15 years ago

Ok, I did, nothing was deleted.

redmine@redmine [~/public_html]# rake --trace db:migrate RAILS_ENV="xcomplete" 
(in /home/redmine/public_html)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump

But it still doesn't work, no errors and the same errors in log.

  ESC[4;35;1mSQL (0.000424)ESC[0m   ESC[0mSELECT `revision` FROM `changesets` WHERE (`changesets`.revision = '2' AND `changesets`.repository_id = 5) ESC[0m
  ESC[4;36;1mChangeset Load (0.000911)ESC[0m   ESC[0;1mSELECT * FROM `changesets` WHERE (`changesets`.repository_id = 5 AND (`changesets`.`committer` = 'bronek'
)) ORDER BY changesets.committed_on DESC, changesets.id DESC LIMIT 1ESC[0m
  ESC[4;35;1mSQL (0.017058)ESC[0m   ESC[0mROLLBACKESC[0m

NoMethodError (undefined method `user_id' for #<Changeset:0xb5eaf62c>):
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/attribute_methods.rb:256:in `method_missing'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/association_preload.rb:210:in `send'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/association_preload.rb:210:in `preload_belongs_to_association'

Any other commands to run?
I've got latest snapshot.

RE: SVN Access - Added by Rafal W. almost 15 years ago

Solved.
there was error while migrating and it stored that there is 101 schema db version while we had only 82 version. After update it stored the correct db schema version inside database. After that db migrate worked.

    (1-5/5)