redmine 执行语句时出错

发布于 2022-08-31 20:13:25 字数 10775 浏览 7 评论 0

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

给我一枪 2022-09-07 20:13:25

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)>'

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文