我有一个正在运行的Redmine 0.8.0网站,我正在尝试升级到1.2.1(最新的稳定版)。我尽可能地遇到了所有listed requirements并跟随他们的upgrade directions,但我在清理之前就陷入了最后一步 - 迁移。基于下面的证据,我猜测我的基础设施的一部分(Ruby,RubyGems,或者我的一个宝石)不是正确的版本,但我无法弄清楚谁有问题。如何确定解决此问题的下一步?
升级方向说明:
如果您已安装任何插件,则还应运行其数据库迁移。 如果您要在此迁移过程中从Redmine 0.8.x升级,则需要先升级插件迁移 :
rake db:migrate:upgrade_plugin_migrations RAILS_ENV=production
rake db:migrate_plugins RAILS_ENV=production
运行
$sudo rake --trace db:migrate:upgrade_plugin_migrations RAILS_ENV=production
给出以下错误:
(in /var/www/html/redmine-1.2.1)
** Invoke db:migrate:upgrade_plugin_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant Rails::Plugin::Dependencies
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:131:in `const_missing'
/var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:47:in `reloadable!'
/var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:47:in `each'
/var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:47:in `reloadable!'
/var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:51:in `evaluate_init_rb'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin.rb:158:in `evaluate_init_rb'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin.rb:154:in `evaluate_init_rb'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin.rb:48:in `load'
/var/www/html/redmine-1.2.1/config/../vendor/plugins/engines/lib/engines/plugin.rb:44:in `load'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin/loader.rb:38:in `load_plugins'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin/loader.rb:37:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin/loader.rb:37:in `load_plugins'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:369:in `load_plugins'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:165:in `process'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in `send'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in `run'
/var/www/html/redmine-1.2.1/config/environment.rb:20
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:547:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in `require'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/tasks/misc.rake:4
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/home/selfsimilar/.gem/ruby/1.8/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
script / about同样失败:
$ RAILS_ENV=production script/about
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:131:in `const_missing': uninitialized constant Rails::Plugin::Dependencies (NameError)
from /var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:47:in `reloadable!'
from /var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:47:in `each'
from /var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:47:in `reloadable!'
from /var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:51:in `evaluate_init_rb'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin.rb:158:in `evaluate_init_rb'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin.rb:154:in `evaluate_init_rb'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin.rb:48:in `load'
... 11 levels...
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/commands/about.rb:1
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/about:4
这里是我的环境的详细信息,在我阅读需求页面时,它符合运行Redmine 1.2.1的规范。
$ ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-linux]
$ gem -v
1.3.7
$ gem list --local
*** LOCAL GEMS ***
actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
arrayfields (4.7.0)
fastthread (1.0.1)
fattr (1.0.3)
git-rails (0.2.1)
hoe (1.8.3)
i18n (0.4.2)
main (2.8.3)
passenger (2.0.6)
rack (1.1.1)
rails (2.3.11)
rake (0.8.7)
rubyforge (1.0.2)
rubygems-update (1.5.0)
tzinfo (0.3.12)
答案 0 :(得分:1)
您正在使用的gem与您的Rails版本不兼容,可能是因为gem已过期。寻找更新版本或自行修补。