AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[redmine](server)

Martin Hope
user6493398
Asked: 2020-12-23 01:05:56 +0800 CST

如何设置 cron 作业以在官方 Redmine Docker 映像中发送提醒电子邮件?

  • 1

在基于Docker Hub上的官方图像的 Redmine 容器中,我正在尝试设置一个 cron 作业以定期发送提醒电子邮件。

按照此处的说明,在容器内键入bundle exec rake redmine:send_reminders RAILS_ENV=productionas可以正常工作。root但是,设置相同的命令 usingcrontab -e不起作用并输出各种错误消息。我怀疑它们与PATH为 Bundler 或 rake 设置正确有关,但不熟悉 Ruby 应用程序我现在完全迷路了。我什至尝试将(看似)相关的环境变量添加到crontab:

PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUBY_MAJOR=2.6
RUBY_VERSION=2.6.5
RUBY_DOWNLOAD_SHA256=d5d6da717fd48524596f9b78ac5a2eeb9691753da5c06923a6c31190abe01a62
GEM_HOME=/usr/local/bundle
BUNDLE_SILENCE_ROOT_WARNING=1
BUNDLE_APP_CONFIG=/usr/local/bundle
RAILS_ENV=production
HOME=/home/redmine
REDMINE_VERSION=4.1.0

但到目前为止无济于事。

以下是我crontab -e到目前为止尝试添加的内容。每个命令(当然)前面都是 cron 的日期时间字符串格式,后面是> /var/log/myjob.log 2>&1记录它输出的任何内容。

  • root cd /usr/src/redmine; bundle exec rake redmine:send_reminders RAILS_ENV=production
  • root cd /usr/src/redmine; /usr/local/bin/bundle exec /usr/local/bundle/bin/rake redmine:send_reminders RAILS_ENV=production

Could not locate Gemfile or .bundle/ directory

  • cd /usr/src/redmine; /usr/local/bin/bundle exec /usr/local/bundle/bin/rake redmine:send_reminders RAILS_ENV=production
  • /usr/src/redmine/remind.sh(以下脚本)

remind.sh

#!/bin/bash
cd /usr/src/redmine
bundle exec /usr/local/bundle/bin/rake redmine:send_reminders days=7 RAILS_ENV="production"
bundler: failed to load command: /usr/local/bundle/bin/rake
(/usr/local/bundle/bin/rake) Bundler::GemNotFound: Could not find
rake-13.0.1 in any of the sources  
/usr/local/lib/ruby/2.6.0/bundler/spec_set.rb:91:in `block in
materialize'   /usr/local/lib/ruby/2.6.0/bundler/spec_set.rb:85:in
`map!'   /usr/local/lib/ruby/2.6.0/bundler/spec_set.rb:85:in
`materialize'   /usr/local/lib/ruby/2.6.0/bundler/definition.rb:170:in
`specs'   /usr/local/lib/ruby/2.6.0/bundler/definition.rb:237:in
`specs_for'   /usr/local/lib/ruby/2.6.0/bundler/definition.rb:226:in
`requested_specs'  
/usr/local/lib/ruby/2.6.0/bundler/runtime.rb:108:in `block in
definition_method'  
/usr/local/lib/ruby/2.6.0/bundler/runtime.rb:20:in `setup'  
/usr/local/lib/ruby/2.6.0/bundler.rb:107:in `setup'  
/usr/local/lib/ruby/2.6.0/bundler/setup.rb:20:in `<top (required)>'  
/usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
`require'  
/usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
`require'
  • root cd /usr/local/bundle/bin/rake; rake --trace redmine:send_reminders RAILS_ENV=production
rake aborted! No Rakefile found (looking for: rakefile, Rakefile,
rakefile.rb, Rakefile.rb)
/usr/local/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:698:in
`raw_load_rakefile'
/usr/local/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:104:in
`block in load_rakefile'
/usr/local/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:186:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:103:in
`load_rakefile'
/usr/local/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:82:in
`block in run'
/usr/local/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:186:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:80:in
`run' /usr/local/lib/ruby/gems/2.6.0/gems/rake-12.3.2/exe/rake:27:in
`<top (required)>' /usr/local/bundle/bin/rake:23:in `load'
/usr/local/bundle/bin/rake:23:in `<main>'

这是里面的东西/usr/src/redmine。存在一个名为的文件Gemfile。

root@975094a2b06b:/usr/src/redmine# ls -l
total 140
-rw-rw-r--  1 redmine redmine  538 Dec 20  2019 CONTRIBUTING.md
-rw-rw-r--  1 redmine redmine 2937 Dec 20  2019 Gemfile
-rw-rw-rw-  1 redmine redmine 5665 Apr 21  2020 Gemfile.lock
-rw-r--r--  1 root    root    5491 Feb 27  2020 Gemfile.lock.mysql2
-rw-r--r--  1 root    root    5483 Feb 27  2020 Gemfile.lock.postgresql
-rw-r--r--  1 root    root    5493 Feb 27  2020 Gemfile.lock.sqlite3
-rw-r--r--  1 root    root    5645 Feb 27  2020 Gemfile.lock.sqlserver
-rw-rw-r--  1 redmine redmine  205 Dec 20  2019 README.rdoc
-rwxrwxr-x  1 redmine redmine  275 Dec 20  2019 Rakefile
drwxrwxr-x  6 redmine redmine 4096 Dec 20  2019 app
-rw-rw-r--  1 redmine redmine  863 Dec 20  2019 appveyor.yml
drwxrwxr-x  2 redmine redmine 4096 Dec 20  2019 bin
drwxr-xr-x  1 redmine redmine 4096 Mar 26  2020 config
-rw-r--r--  1 root    root     136 Mar 10  2020 config.ru
drwxrwxrwx  1 redmine redmine 4096 Mar 26  2020 db
drwxrwxr-x  2 redmine redmine 4096 Dec 20  2019 doc
drwxrwxr-x  5 redmine redmine 4096 Dec 20  2019 extra
drwxr-xr-x  3 redmine redmine 4096 Oct 19 10:16 files
drwxrwxr-x  6 redmine redmine 4096 Dec 20  2019 lib
drwxr-xr-x  2 redmine redmine 4096 Mar 18  2020 log
drwxr-xr-x  5 redmine redmine 4096 Mar 26  2020 plugins
drwxrwxr-x  1 redmine redmine 4096 Dec 20  2019 public
-rwxr-xr-x  1 root    root     125 Dec 17 16:24 remind.sh
drwxrwxrwx  2 redmine redmine 4096 Feb 27  2020 sqlite
drwxrwxr-x 14 redmine redmine 4096 Dec 20  2019 test
drwxr-xr-x  1 redmine redmine 4096 Feb 27  2020 tmp
drwxrwxr-x  2 redmine redmine 4096 Dec 20  2019 vendor

什么是正确的命令?

cron redmine docker
  • 1 个回答
  • 388 Views
Martin Hope
smokeing
Asked: 2016-08-24 09:31:29 +0800 CST

在没有 VPN 的情况下公开公开开发/团队工具是否安全?

  • 3

我们希望有一个自托管的 slack 替代方案(mattermost,rocket.chat),但是将它隐藏在 VPN 后面对我们的一些用户来说是不舒服的。

如果不公开,我会觉得更安全,但它到底有多危险?

我相信这个问题可以应用于所有开发应用程序,例如:gitlab、redmine 等。

vpn security redmine gitlab
  • 2 个回答
  • 155 Views
Martin Hope
Anatol
Asked: 2016-06-04 02:58:27 +0800 CST

libapache2-mod-passenger 更新打破 redmine

  • 0

在 ubuntu 12.04 服务器 redmine 2.5 上进行安全更新后(错误 500)。我们认识到 libapache2-mod-passenger 是从

libapache2-mod-passenger=2.2.11debian-2

至

libapache2-mod-passenger=2.2.11debian-2+deb6u1ubuntu12.04.1

再次降级这个包解决了这个问题。我该怎么做才能在下一次安全更新中不遇到同样的问题?

redmine ubuntu-12.04
  • 1 个回答
  • 53 Views
Martin Hope
Marc Riera
Asked: 2016-04-13 22:41:36 +0800 CST

如何解决不同 gem 依赖项之间的冲突

  • 2

让我们看看是否有人可以帮助我,我不知道我在做什么。

服务器是 debian 8.4 ,完全更新。

我还使用“gem update”更新了 gems,所有可能的错误和警告都已修复。

我正在安装 redmine_git_hosting 并且发生了这种情况:

root@esplx345:/usr/share/redmine# bundle install --without development test
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break
this application for all non-root users on this machine.
Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.
Your Gemfile lists the gem redcarpet (~> 3.3.2) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Fetching https://github.com/jbox-web/gitolite-rugged.git
Fetching https://github.com/jbox-web/grack.git
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "rack":
  In snapshot (Gemfile.lock):
    rack (= 1.5.5)

  In Gemfile:
    rails (~> 4.1.4) was resolved to 4.1.15, which depends on
      actionpack (= 4.1.15) was resolved to 4.1.15, which depends on
        rack (~> 1.5.2)

    gitlab-grack was resolved to 2.0.0.pre, which depends on
      rack (~> 1.4.1)

    rack-openid was resolved to 1.4.2, which depends on
      rack (>= 1.1.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
root@esplx345:/usr/share/redmine#

我用谷歌搜索并尝试了很多东西,但没有任何接缝可以工作。

我的系统上有以下宝石:

root@esplx345:/usr/share/redmine# gem update
Updating installed gems
Nothing to update
root@esplx345:/usr/share/redmine# gem list

*** LOCAL GEMS ***

actionmailer (4.2.6, 4.1.15, 4.1.8)
actionpack (4.2.6, 4.1.15, 4.1.8)
actionpack-action_caching (1.1.1)
actionview (4.2.6, 4.1.15, 4.1.8)
activejob (4.2.6)
activemodel (4.2.6, 4.1.15, 4.1.8)
activerecord (4.2.6, 4.1.15, 4.1.8)
activesupport (4.2.6, 4.1.15, 4.1.8)
arel (7.0.0, 6.0.3, 5.0.1.20140414130214)
atomic (1.1.99, 1.1.16)
awesome_nested_set (3.0.3, 3.0.0)
bigdecimal (1.2.7, default: 1.2.4)
builder (3.2.2)
bundler (1.11.2, 1.7.4)
celluloid (0.17.3, 0.15.2)
celluloid-essentials (0.20.5)
celluloid-extras (0.20.5)
celluloid-fsm (0.20.5)
celluloid-pool (0.20.5)
celluloid-supervision (0.20.5)
coderay (1.1.1, 1.1.0)
coffee-rails (4.1.1, 4.0.1)
coffee-script (2.4.1, 2.2.0)
coffee-script-source (1.10.0, 1.3.3)
concurrent-ruby (1.0.1)
erubis (2.7.0)
eventmachine (1.2.0.1, 1.0.3)
execjs (2.6.0, 2.2.1)
fcgi (0.9.2.1)
ffi (1.9.10, 1.9.6)
gitlab-grack (2.0.2)
globalid (0.3.6)
hike (2.1.3, 1.2.1)
hitimes (1.2.3)
i18n (0.7.0, 0.6.9)
io-console (0.4.5, default: 0.4.2)
jbuilder (2.4.1, 2.1.3)
jquery-rails (4.1.1, 3.1.4, 3.1.2)
json (1.8.3, default: 1.8.1)
listen (3.0.6, 2.4.0)
loofah (2.0.3)
mail (2.6.4, 2.6.1)
mime-types (3.0, 1.25)
mime-types-data (3.2016.0221)
mini_portile2 (2.1.0, 2.0.0)
minitest (5.8.4, 5.4.2, default: 4.7.5)
multi_json (1.11.2, 1.10.1)
mysql2 (0.4.3, 0.3.20, 0.3.16)
net-http-persistent (2.9.4, 2.9)
net-ldap (0.14.0, 0.8.0)
nokogiri (1.6.7.2)
oj (2.15.0, 2.10.3)
pkg-config (1.1.7)
polyglot (0.3.5, 0.3.4)
power_assert (0.2.7)
protected_attributes (1.1.3, 1.0.8)
psych (2.0.17, default: 2.0.5)
rack (1.6.4, 1.5.5, 1.5.2)
rack-openid (1.4.2)
rack-test (0.6.3, 0.6.2)
rails (4.2.6, 4.1.15, 4.1.8)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (1.0.7)
rails-html-sanitizer (1.0.3)
railties (4.2.6, 4.1.15, 4.1.8)
rake (11.1.2, 10.3.2, default: 10.1.0)
rb-fsevent (0.9.7)
rb-inotify (0.9.7, 0.9.5)
rdoc (4.2.2, default: 4.1.0)
redcarpet (3.3.4, 3.1.2)
request_store (1.3.1, 1.1.0)
rmagick (2.15.4, 2.13.2)
ruby-openid (2.7.0, 2.5.0)
rubygems-update (2.6.3)
sass (3.4.22, 3.4.6)
sass-rails (5.0.4, 4.0.3)
sdoc (0.4.1)
spring (1.7.1, 1.1.3)
sprockets (3.6.0, 2.12.3)
sprockets-rails (3.0.4, 2.3.3, 2.1.3)
sqlite3 (1.3.11, 1.3.9)
test-unit (3.1.8, default: 2.1.5.0)
thor (0.19.1)
thread_safe (0.3.5, 0.3.3)
tilt (2.0.2, 1.4.1)
timers (4.1.1, 1.1.0)
treetop (1.6.5, 1.4.15)
turbolinks (2.5.3, 2.2.2)
tzinfo (1.2.2, 1.1.0)
uglifier (3.0.0, 2.5.3)
will_paginate (3.1.0)
yajl-ruby (1.2.1, 1.2.0)
root@esplx345:/usr/share/redmine#

非常感谢您的帮助。

debian ruby redmine rubygems
  • 2 个回答
  • 31191 Views
Martin Hope
kubanczyk
Asked: 2016-02-26 05:49:22 +0800 CST

redmine 糟糕的写入性能(更新不是真正的多线程)

  • 0

(已经自我回答)我正在与大约 100 个用户的 redmine 性能不佳作斗争。为了测试它,我设置了一个简单的场景来更新五个不同示例问题的“完成百分比”。所有更新都在同一秒开始,使用curl. 令我惊讶的是,redmine 中的更新似乎是序列化的(我的意思是不是多线程的),时序如下:

real    0m1.122s
real    0m1.404s
real    0m2.258s
real    0m2.782s
real    0m3.151s
real    0m3.336s

或者另一种尝试,当其他会话的一些处理也受到阻碍时:

real    0m7.492s
real    0m7.803s
real    0m8.045s
real    0m8.246s
real    0m8.597s
real    0m8.825s

production.log在处理大量 SQL 查询后的关键时刻是 COMMIT 阶段。请注意 COMMIT 是如何在毫秒内完成的,但在 COMMIT 之间发生了一些神秘的事情,不仅将它们序列化,而且需要几秒钟才能达到 Completed 状态。此日志摘录完好无损 - 我没有删除中间的任何行。

   (0.6ms)  SELECT COUNT(*) FROM `custom_workflows` WHERE `custom_workflows`.`active` = 1 AND `custom_workflows`.`observable` = 'issue' AND (is_for_all OR EXISTS (SELECT * FROM custom_workflows_projects WHERE project_id=123 AND custom_workflow_id=id))
   (30.1ms)  COMMIT
Redirected to http://redmine.mydomain.local/issues/11973
Completed 302 Found in 7418.4ms (ActiveRecord: 135.8ms)
   (0.6ms)  SELECT COUNT(*) FROM `custom_workflows` WHERE `custom_workflows`.`active` = 1 AND `custom_workflows`.`observable` = 'issue' AND (is_for_all OR EXISTS (SELECT * FROM custom_workflows_projects WHERE project_id=123 AND custom_workflow_id=id))
   (24.8ms)  COMMIT
Redirected to http://redmine.mydomain.local/issues/9240
Completed 302 Found in 7738.3ms (ActiveRecord: 57.4ms)
   (0.4ms)  SELECT COUNT(*) FROM `custom_workflows` WHERE `custom_workflows`.`active` = 1 AND `custom_workflows`.`observable` = 'issue' AND (is_for_all OR EXISTS (SELECT * FROM custom_workflows_projects WHERE project_id=123 AND custom_workflow_id=id))
   (25.9ms)  COMMIT
Redirected to http://redmine.mydomain.local/issues/9614
Completed 302 Found in 7949.0ms (ActiveRecord: 135.7ms)
   (0.5ms)  SELECT COUNT(*) FROM `custom_workflows` WHERE `custom_workflows`.`active` = 1 AND `custom_workflows`.`observable` = 'issue' AND (is_for_all OR EXISTS (SELECT * FROM custom_workflows_projects WHERE project_id=123 AND custom_workflow_id=id))
   (24.6ms)  COMMIT
Redirected to http://redmine.mydomain.local/issues/12016
Completed 302 Found in 8058.5ms (ActiveRecord: 102.5ms)
   (0.5ms)  SELECT COUNT(*) FROM `custom_workflows` WHERE `custom_workflows`.`active` = 1 AND `custom_workflows`.`observable` = 'issue' AND (is_for_all OR EXISTS (SELECT * FROM custom_workflows_projects WHERE project_id=123 AND custom_workflow_id=id))
   (21.2ms)  COMMIT
Redirected to http://redmine.mydomain.local/issues/8853
Completed 302 Found in 8472.5ms (ActiveRecord: 90.4ms)
   (0.5ms)  SELECT COUNT(*) FROM `custom_workflows` WHERE `custom_workflows`.`active` = 1 AND `custom_workflows`.`observable` = 'issue' AND (is_for_all OR EXISTS (SELECT * FROM custom_workflows_projects WHERE project_id=123 AND custom_workflow_id=id))
   (27.9ms)  COMMIT
Redirected to http://redmine.mydomain.local/issues/10007
Completed 302 Found in 8700.4ms (ActiveRecord: 137.4ms)

我已经检查过的内容:

  • 乘客状态的线程数绰绰有余
  • apache2 httpd 的进程数绰绰有余
  • mysql 5.1 使用 innodb
  • innotop 不显示锁
  • innotop 不会过多的 I/O
  • iostat 没有显示过多的 I/O(大约 10-15 IOPS,磁盘最大 17% 的时间使用)
  • top 没有显示过多的 CPU 使用率(最多可能 400% 的 70%)。
redmine
  • 1 个回答
  • 81 Views
Martin Hope
ZioByte
Asked: 2015-02-16 03:14:35 +0800 CST

无法激活“(更多)”链接

  • 0

我似乎无法激活问题编辑。

我知道 [[ http://www.redmine.org/projects/redmine/wiki/RedmineIssues#Editing-an-existing-issue]],但出了点问题。

我是该项目的经理(即使我以“管理员”身份登录也一样)并且我检查了它是否包含“编辑问题”权限。尽管如此,“(更多)”链接永远不会出现。

与标准的另一个(可能是重大的)偏差是我_没有_有“更新”链接;我有一个“编辑”链接。链接的完整列表是(注意缺少“重复”和“移动”):

功能 #2 编辑日志时间观看复制删除

我究竟做错了什么?

有什么具体的设置要检查吗?

我的安装如下:

root@redmine www/redmine# RAILS_ENV=production script/about

sh:1:darcs:未找到
sh: 1: cvs: 未找到
环境:
  Redmine 版本 2.6.1.stable
  Ruby 版本 1.9.3-p194 (2012-04-20) [x86_64-linux]
  Rails 版本 3.2.21
  环境制作
  数据库适配器 Mysql2
单片机:
  颠覆 1.6.17
  水银 2.2.2
  集市 2.6.0
  Git 1.7.10.4
  文件系统
Redmine插件:
  redmine_dmsf 1.4.9 稳定版
root@redmine www/redmine#

蒂亚毛罗

redmine
  • 1 个回答
  • 33 Views
Martin Hope
Anatol
Asked: 2014-07-02 06:11:55 +0800 CST

Redmine 迁移后出现错误 500

  • 0

我已经在Ubuntu 12.04上安装了一个新的Redmine 2.5.1安装,使用 apache2 和乘客遵循以下方法:http ://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Ubuntu_step_by_step

在那之后我已经

  1. 转储了现有 Redmine 1.1.3.stable 安装的 mysql 数据库,
  2. 将其还原到我的新服务器上的新数据库,
  3. 将附件从旧服务器复制到新服务器到 /usr/share/redmine/files (+ chmod 755)
  4. 告诉 redmine 将新创建的数据库与我在数据库配置中导入的旧票证一起使用。
  5. 将 dir 更改为 /usr/share/redmine 并触发此操作
rake db:migrate RAILS_ENV=production 

rake generate_secret_token

到目前为止,一切都很好。Redmine 可以在浏览器中查看,管理设置可以在 Projects 中更改。

但是,如果我尝试创建新票证或查看旧票证,我会收到错误 500。此外,Redmine 给了我版本 1.1.3,但应该是 2.5.1。看来我可能忘记运行迁移脚本了。

错误 500

找到我创建的错误

  1. /usr/share/redmine/log/production.log
  2. chmod 755 生产日志
  3. 更改了我的 apache2 配置中的错误处理
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogLevel WARN
ErrorLog "/var/log/apache2/redmine-error.log"
CustomLog "/var/log/apache2/redmine-access.log" common

但我在 production.log、redmine-error.log、error.log 中看不到任何错误!?

如何解决错误 500 问题?

更新我处理让日志记录运行。这是日志输出:

    ActiveRecord::StatementInvalid (Mysql::Error: Unknown column 'author' in 'where clause': SELECT * FROM `workflows` WHERE (`workflows`.old_status_id = 1 AND (role_id IN (1) AND tracker_id = 1 AND ((author = 0 AND assignee = 0) OR author = 1))) ):
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract_adapter.rb:227:in `log'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/mysql_adapter.rb:324:in `execute'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/mysql_adapter.rb:639:in `select'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/query_cache.rb:81:in `cache_sql'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
  /usr/lib/ruby/vendor_ruby/active_record/base.rb:665:in `find_by_sql'
  /usr/lib/ruby/vendor_ruby/active_record/base.rb:1582:in `find_every'
  /usr/lib/ruby/vendor_ruby/active_record/base.rb:619:in `find'
  /usr/lib/ruby/vendor_ruby/active_record/associations/association_collection.rb:60:in `find'
  app/models/issue_status.rb:78:in `find_new_statuses_allowed_to'
  /usr/lib/ruby/vendor_ruby/active_record/associations/association_proxy.rb:215:in `send'
  /usr/lib/ruby/vendor_ruby/active_record/associations/association_proxy.rb:215:in `method_missing'
  app/models/issue.rb:471:in `new_statuses_allowed_to'
  app/controllers/issues_controller.rb:325:in `build_new_issue_from_params'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:178:in `send'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:178:in `evaluate_method'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:166:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:225:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:629:in `run_before_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:615:in `call_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:610:in `perform_action_without_benchmark'
  /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
  /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
  /usr/lib/ruby/vendor_ruby/action_controller/rescue.rb:160:in `perform_action_without_flash'
  /usr/lib/ruby/vendor_ruby/action_controller/flash.rb:151:in `perform_action'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `send'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `process_without_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:606:in `process'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:391:in `process'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:386:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/routing/route_set.rb:438:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:87:in `dispatch'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:121:in `_call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:130:in `build_middleware_stack'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:9:in `cache'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:28:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/string_coercion.rb:25:in `call'
  /usr/lib/ruby/vendor_ruby/rack/head.rb:9:in `call'
  /usr/lib/ruby/vendor_ruby/rack/methodoverride.rb:24:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/params_parser.rb:15:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/session/cookie_store.rb:99:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/failsafe.rb:26:in `call'
  /usr/lib/ruby/vendor_ruby/rack/lock.rb:15:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:106:in `call'
  /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/phusion_passenger/passenger-spawn-server:61
redmine
  • 1 个回答
  • 2727 Views
Martin Hope
Scone
Asked: 2013-04-11 11:32:38 +0800 CST

Redmine db:找不到迁移方法

  • 0

我正在尝试从 redmine 1.0 迁移到 redmine 2.3,但在运行 db:migrate 时出现错误。

sudo rake db:migrate RAILS_ENV=production --trace

(in /opt/redmine-2.3)
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/file_utils.rb:9: warning: already initialized constant RUBY
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/file_utils.rb:86: warning: already initialized constant LN_SUPPORTED
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
==  BuildProjectsTree: migrating ==============================================
rake aborted!
An error has occurred, all later migrations canceled:

undefined method `inherit_members_changed?' for #<Project:0x7f82e2dad038>
/var/lib/gems/1.8/gems/activemodel-3.2.13/lib/active_model/attribute_methods.rb:407:in `method_missing'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/attribute_methods.rb:149:in `method_missing'
/opt/redmine-2.3/app/models/project.rb:85:in `_callback_after_748'
/var/lib/gems/1.8/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:460:in `_run__1269722363__save__4__callbacks'
/var/lib/gems/1.8/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `send'
/var/lib/gems/1.8/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `__run_callback'
/var/lib/gems/1.8/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
/var/lib/gems/1.8/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `send'
/var/lib/gems/1.8/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `run_callbacks'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/callbacks.rb:264:in `create_or_update'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/persistence.rb:104:in `save!'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/validations.rb:56:in `save!'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/attribute_methods/dirty.rb:33:in `save!'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/transactions.rb:264:in `save!'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/transactions.rb:313:in `with_transaction_returning_status'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/transactions.rb:208:in `transaction'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/transactions.rb:264:in `save!'
/opt/redmine-2.3/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:185:in `rebuild!'
/opt/redmine-2.3/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:192:in `call'
/opt/redmine-2.3/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:192:in `rebuild!'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/relation/delegation.rb:6:in `each'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/relation/delegation.rb:6:in `__send__'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/relation/delegation.rb:6:in `each'
/opt/redmine-2.3/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:189:in `rebuild!'
/opt/redmine-2.3/app/models/project.rb:416:in `rebuild_tree!'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/transactions.rb:208:in `transaction'
/opt/redmine-2.3/app/models/project.rb:414:in `rebuild_tree!'
/opt/redmine-2.3/db/migrate/105_build_projects_tree.rb:3:in `up'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/migration.rb:370:in `up'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/migration.rb:410:in `send'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/migration.rb:410:in `migrate'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/migration.rb:410:in `migrate'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in `with_connection'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/migration.rb:389:in `migrate'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/migration.rb:528:in `__send__'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/migration.rb:528:in `migrate'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/migration.rb:720:in `migrate'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/migration.rb:777:in `call'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/migration.rb:777:in `ddl_transaction'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/migration.rb:719:in `migrate'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/migration.rb:700:in `each'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/migration.rb:700:in `migrate'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/migration.rb:570:in `up'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/migration.rb:551:in `migrate'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:193
/usr/lib/ruby/1.8/rake.rb:636:in `call'
/usr/lib/ruby/1.8/rake.rb:636:in `execute'
/usr/lib/ruby/1.8/rake.rb:631:in `each'
/usr/lib/ruby/1.8/rake.rb:631:in `execute'
/usr/lib/ruby/1.8/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:583:in `invoke'
/usr/lib/ruby/1.8/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2029:in `each'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2023:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2001:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

问题似乎是 project.inherit_members_changed?不存在,但在 project.rb 的第 85 行被调用

after_save :update_inherited_members, :if => Proc.new {|project| project.inherit_members_changed?}

有谁知道这个问题的根源是什么?

::更新::

我现在尝试升级到 ruby​​ 1.9.3 并得到同样的错误。

rake db:migrate RAILS_ENV=production
==  BuildProjectsTree: migrating ==============================================
rake aborted!
An error has occurred, all later migrations canceled:

undefined method `inherit_members_changed?' for #<Project:0x00000004b36d80>

可能是rake版本问题?

我也运行了 bundle install 并安装了所有需要的 gem。

redmine
  • 3 个回答
  • 1794 Views
Martin Hope
Rohit
Asked: 2012-07-08 04:54:01 +0800 CST

通过 Nginx 使用 Webrick 运行 Redmine 是个好主意吗?

  • 0

这里的任务是为一个小型 (<20) 团队设置 Redmine。可能有一些用户会以商业客户的身份访问该设置。我熟悉为 Apache 和最近的 Nginx 设置 PHP。我不熟悉 Ruby、Ruby-On-Rails 等。我更喜欢使用操作系统 (Ubuntu Linux LTS) 的包管理器来安装不同的组件,因为它负责依赖性和更新。

我已经成功地使用 PHP-FPM 设置了 Nginx,并且正在努力使用 Redmine。

正如这里所建议的,我让 Redmine 在端口 3000 上运行。

# /etc/init/redmine.conf
# Redmine

description "Redmine" 

start on runlevel [2345]
stop on runlevel [!2345]

expect daemon
exec ruby /usr/share/redmine/script/server webrick -e production -b 0.0.0.0 -d

并使用此页面上的 Nginx 配置,我使用 Nginx 将请求代理到 Webrick。

server {
    listen       80;
    server_name  myredmine.example.com;

    location / {
        proxy_pass http://127.0.0.1:3000;

    }
}

这在当地运作良好。在现场盒子(256 MB VPS)上试用之前,我想听听一些意见。

此外,我应该使用类似monit的东西来监视 webrick 是否失败吗?

nginx redmine
  • 1 个回答
  • 2478 Views
Martin Hope
wonbyte
Asked: 2012-05-12 06:29:54 +0800 CST

lighttpd fastcgi unix 绑定错误

  • 1

我正在尝试配置 Lighttpd 以使用 FastCGI 运行 Redmine。我已将以下代码添加到我的标准中lighttpd.conf:

$HTTP["host"] =~ "^foo.bar.com$" {
  server.document-root  = "/usr/share/redmine/public/"
  index-file.names += ( "dispatch.fcgi" ) #dispatch.fcgi if rails specified
  server.error-handler-404   = "/dispatch.fcgi" #too
  fastcgi.server = (
    ".fcgi" => (
      "localhost" => (
        "socket" => "/var/run/lighttpd/rails-fastcgi.sock",
        "bin-path" => "/usr/share/redmine/public/dispatch.fcgi"
      )
    )
)
}

当我尝试启动 lig​​httpd 服务器时,我在错误日志中得到以下信息:

May 11 10:24:05 ohio lighttpd[5527]: (log.c.166) server started 
May 11 10:24:05 ohio lighttpd[5527]: (mod_fastcgi.c.977) bind failed for: unix:/var/run/lighttpd/rails-fastcgi.sock-0 No such file or directory 
May 11 10:24:05 ohio lighttpd[5527]: (mod_fastcgi.c.1397) [ERROR]: spawning fcgi failed. 
May 11 10:24:05 ohio lighttpd[5527]: (server.c.945) Configuration of plugins failed. Going down.

谁能帮我解释为什么绑定总是失败?

ruby-on-rails fastcgi lighttpd redmine
  • 2 个回答
  • 1003 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve