rails update 3.2.5

时间:2012-06-07 11:19:44

标签: ruby ruby-on-rails-3

用于我们的redmine-installation(=>项目计划,票务等工具) 我们在服务器上安装了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 1.8.6 ......

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

你能在这帮我吗?

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

安斯加尔

1 个答案:

答案 0 :(得分:1)

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

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

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