redmine 执行语句时出错

bashbluemark@bluemark-MS-7666:/usr/local/redmine$ RAILS_ENV=production rake db:migrate
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
rake aborted!
Mysql2::Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/mysql2-0.3.17/lib/mysql2/client.rb:70:in `connect'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/mysql2-0.3.17/lib/mysql2/client.rb:70:in `initialize'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/model_schema.rb:224:in `table_exists?'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/attribute_methods/primary_key.rb:75:in `get_primary_key'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/attribute_methods/primary_key.rb:60:in `reset_primary_key'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/attribute_methods/primary_key.rb:49:in `primary_key'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activerecord-3.2.19/lib/active_record/attribute_assignment.rb:13:in `attributes_protected_by_default'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activemodel-3.2.19/lib/active_model/mass_assignment_security.rb:216:in `block in protected_attributes_configs'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activemodel-3.2.19/lib/active_model/mass_assignment_security.rb:188:in `yield'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activemodel-3.2.19/lib/active_model/mass_assignment_security.rb:188:in `protected_attributes'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activemodel-3.2.19/lib/active_model/mass_assignment_security.rb:118:in `block in attr_protected'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activemodel-3.2.19/lib/active_model/mass_assignment_security.rb:117:in `each'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activemodel-3.2.19/lib/active_model/mass_assignment_security.rb:117:in `attr_protected'
/usr/local/redmine/app/models/issue_relation.rb:73:in `<class:IssueRelation>'
/usr/local/redmine/app/models/issue_relation.rb:18:in `<top (required)>'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `block in require'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:359:in `require_or_load'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:502:in `load_missing_constant'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:190:in `each'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:190:in `const_missing'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:514:in `load_missing_constant'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:190:in `each'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:190:in `const_missing'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:514:in `load_missing_constant'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:190:in `each'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:190:in `const_missing'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:514:in `load_missing_constant'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:190:in `each'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:190:in `const_missing'
/usr/local/redmine/lib/redmine/helpers/gantt.rb:28:in `<class:Gantt>'
/usr/local/redmine/lib/redmine/helpers/gantt.rb:21:in `<module:Helpers>'
/usr/local/redmine/lib/redmine/helpers/gantt.rb:19:in `<module:Redmine>'
/usr/local/redmine/lib/redmine/helpers/gantt.rb:18:in `<top (required)>'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `block in require'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/usr/local/redmine/lib/redmine.rb:56:in `<top (required)>'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `block in require'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/usr/local/redmine/config/initializers/30-redmine.rb:4:in `<top (required)>'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in `load'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in `block in load'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in `load'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/railties-3.2.19/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/railties-3.2.19/lib/rails/engine.rb:592:in `each'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/railties-3.2.19/lib/rails/engine.rb:592:in `block in <class:Engine>'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/railties-3.2.19/lib/rails/initializable.rb:30:in `instance_exec'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/railties-3.2.19/lib/rails/initializable.rb:30:in `run'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/railties-3.2.19/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/railties-3.2.19/lib/rails/initializable.rb:54:in `each'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/railties-3.2.19/lib/rails/initializable.rb:54:in `run_initializers'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/railties-3.2.19/lib/rails/application.rb:136:in `initialize!'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/railties-3.2.19/lib/rails/railtie/configurable.rb:30:in `method_missing'
/usr/local/redmine/config/environment.rb:14:in `<top (required)>'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `block in require'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/railties-3.2.19/lib/rails/application.rb:103:in `require_environment!'
/home/bluemark/.rvm/gems/ruby-2.2.0/gems/railties-3.2.19/lib/rails/application.rb:305:in `block (2 levels) in initialize_tasks'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

请求指导
那个mysql2的我知道怎么解决 但是之前那个错误怎么解决

/home/bluemark/.rvm/gems/ruby-2.2.0/gems/activesupport-3.2.19/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
rake aborted!
阅读 5.1k
1 个回答

circular argument reference - now

这个要检查你的代码,而且 backtrack 里边已经给出出错的地方是

/usr/local/redmine/app/models/issue_relation.rb:73:in `<class:IssueRelation>'
/usr/local/redmine/app/models/issue_relation.rb:18:in `<top (required)>'

可能是变量有反复引用自身的情况。可以贴下代码上来吗

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
logo
项目管理
子站问答
访问
宣传栏