0

对于我们的 redmine 安装(=> 项目计划、票务等工具),我们在服务器上安装了 ruby​​,效果很好……但是现在我们需要一个 rails 更新(Rails 3.2.3)来更新 redmine 等等麻烦开始了:

我做了以下事情:

1.) 安装 ruby​​ 1.9.3

root@information:~#  rvm install 1.9.3

Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194 - #fetching 
ruby-1.9.3-p194 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p194 (already extracted)
ruby-1.9.3-p194 - #configuring
ruby-1.9.3-p194 - #compiling 
ruby-1.9.3-p194 - #installing 
Removing old Rubygems files...
Installing rubygems-1.8.24 for ruby-1.9.3-p194 ...
Installation of rubygems completed successfully.
ruby-1.9.3-p194 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.3-p194 - #importing default gemsets (/usr/local/rvm/gemsets/)
Install of ruby-1.9.3-p194 - #complete 
root@information:~# ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
root@information:~#
root@information:/var/www/redmine# rvm docs generate
Currently 'rvm docs ...' does not work with non-rvm rubies.
root@information:/var/www/redmine# 

2.) 更新宝石

root@information:/var/www/redmine# gem update

Updating installed gems
Updating actionmailer
Successfully installed i18n-0.6.0
Successfully installed multi_json-1.3.6
Successfully installed activesupport-3.2.5
Successfully installed builder-3.0.0
Successfully installed activemodel-3.2.5
Successfully installed rack-1.4.1
Successfully installed rack-cache-1.2
Successfully installed rack-test-0.6.1
Successfully installed journey-1.0.3
Successfully installed hike-1.2.1
Successfully installed tilt-1.3.3
Successfully installed sprockets-2.1.3
Successfully installed erubis-2.7.0
Successfully installed actionpack-3.2.5
Successfully installed mime-types-1.18
Successfully installed polyglot-0.3.3
Successfully installed treetop-1.4.10
Successfully installed mail-2.4.4
Successfully installed actionmailer-3.2.5
Updating activerecord
Successfully installed arel-3.0.2
Successfully installed activerecord-3.2.5
Updating activeresource
Successfully installed activeresource-3.2.5
Updating bundler
Successfully installed bundler-1.1.4
Updating fastercsv
Successfully installed fastercsv-1.5.5
Updating rails
Building native extensions.  This could take a while...

Depending on your version of ruby, you may need to install ruby rdoc/ri data:

<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!

Successfully installed rack-ssl-1.3.2
Successfully installed thor-0.15.2
Successfully installed json-1.7.3
Successfully installed rdoc-3.12
Successfully installed railties-3.2.5
Successfully installed rails-3.2.5

Gems updated: i18n, multi_json, activesupport, builder, activemodel, rack, rack-cache, rack-test, journey, hike, tilt, sprockets, erubis, actionpack, mime-types, polyglot, treetop, mail, actionmailer, arel, activerecord, activeresource, bundler, fastercsv, rack-ssl, thor, json, rdoc, railties, rails


root@information:/var/www/redmine#

3.) 尝试更新rails

root@information:/var/www/redmine# gem install rails --version '~> 3.2.0'

Successfully installed rails-3.2.5

1 gem installed

Installing ri documentation for rails-3.2.5...
Installing RDoc documentation for rails-3.2.5...
root@information:/var/www/redmine# rails -v

Rails 2.3.5

root@information:/var/www/redmine# 

我的问题是,redmine 2.0.1 与 ruby​​ 1.9.3 有问题,因此尝试通过例如“rvm uninstall 1.9.3”降级 ruby​​ 并尝试重新安装 ruby​​ 1.8.6 ...

毕竟我刚刚升级到 ruby​​ 1.9.3 但未能升级到 rails 3.2.5 ....

你能帮帮我吗?

我是红宝石新手。我忘记安装步骤了吗?在此先感谢您的帮助?干杯,

安斯加尔

4

1 回答 1

1

一般来说,Ruby 升级不会干扰您的数据库。因此,第一步是备份您的数据库。一旦您进行了全新安装,Rails 升级通常会干扰您的数据库,因为您通常必须在最后执行“rake db:migrate”。

升级完整堆栈有很多步骤:ruby、rails,然后是 redmine。您需要阅读本文档,它将指导您逐步完成升级:

http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade

于 2012-06-07T13:34:42.957 回答