一、安装redmine
1.下载InstantRails,解压缩到C盘根目录下。
2.下载Redmine,解压缩。将Redmine解压缩的文件夹直接拷贝到InstantRails目录的rails_apps目录下。
4.启动,检查apache和mysql都正常启动。(保证机器以前没有mysql,有的话要提前卸载,否则可能与InstantRails自带的mysql冲突)
5.创建数据库,在phpMyAdmin中使用sql语句创建数据库:create database redmine character set utf8;
注:进入phpmyadmin下有两种方式。法1:浏览器输入127.0.0.1/mysql/法2:InstantRails 界面(就是刚才点击后的程序界面)的I→Configure→Database(via PhpMyAdmin)”。如果该栏是灰的,表示你安装后没重启机器。重启一下即可
6.将redmine的config目录下的ample文件重命名为l。里面是数据库的配置文件,说明数据库用户名、密码等。
7.往数据库里导数据
点击InstantRails界面(就是刚才点击后的程序界面)的I→Rails Applications →Open Ruby Console Window栏目,然后会跳出dos窗口。在里面输入命令:cd redmine
rake db:migrate RAILS_ENV="production"
如果执行这个出现
rake aborted!
Could not find RubyGem rack(~>1.0.1)错误,请参考下面
这是因为gem的配置过低,无法进行远程更新,执行gem-v发现是1.0.1
1、从下面这个地址下载rubygems-update-1.,/frs/download.php/70695/rubygems-update-1.
然后进入I→Rails Applications→Open Ruby Console Window栏目,然后会跳出dos窗口。在里面输入命令
gem install--local rubygems-update-1.,出现信息
Successfully installed rubygems-update-1.3.7
1gem installed
Installing ri documentation for rubygems-update-1.
Installing RDoc documentation for rubygems-update-1.
Could not find main page README
Could not find main page README
Could not find main page README
Could not find main page README
执行gem-v查看,发现并没有更新成功,Could not find main page README是什么意思我没弄明白,但是我从production./yaml上发现这么一句
If you have an older version of RubyGems installed,then you can still
do it in two steps:
$gem install rubygems-update#again,might need to be admin/root
$update_rubygems#...here too
照着再执行update_rubygems,接着出现的信息很多,就不帖出来,再执行gem-v,发现更新成功,已经是1.3.7了
这一步是一切成功的源泉!!!!!!
2、接着再执行gem update--system,提示
Updating RubyGems
Nothing to update
这是为什么我不明白,请高手指点一下
3、再执行gem update rails--include-dependencies,提示信息
Updating installed gems
Updating rails
ERROR:Error installing rails:
actionpack requires rack(~>1.0.0,runtime)
Gems updated:activesupport,activerecord
Installing ri documentation for activesupport-2.
Installing ri documentation for activerecord-2.
Installing RDoc documentation for activesupport-2.
Installing RDoc documentation for activerecord-2.
执行rails-v,发现还是2.0.2没有更新成功,根据actionpack requires rack(~>1.0.0,runtime),应该是actionpack需要1.0.0版本的rack
4、执行gem install rack-v=1.0.0
Successfully installed rack-1.0.0
1gem installed
Installing ri documentation for rack-1.
Installing RDoc documentation for rack-1.
更新成功
5、再次执行gem update rails--include-dependencies
出现信息
Updating installed gems
Updating rails
mysql需要安装documentationSuccessfully installed rake-0.8.7
Successfully installed activesupport-2.3.8
Successfully installed activerecord-2.3.8
Successfully installed rack-1.1.0
Successfully installed actionpack-2.3.8
Successfully installed actionmailer-2.3.8
Successfully installed activeresource-2.3.8
Successfully installed rails-2.3.8
Gems updated:rake,activesupport,activerecord,rack,actionpack,actionmailer,activeresource, rails
Installing ri documentation for rake-0.
Installing ri documentation for activesupport-2.
Installing ri documentation for activerecord-2.
Installing ri documentation for rack-1.
Installing ri documentation for actionpack-2.
Installing ri documentation for actionmailer-2.
Installing ri documentation for activeresource-2.
Installing ri documentation for rails-2.
Installing RDoc documentation for rake-0.
Installing RDoc documentation for activesupport-2.
Installing RDoc documentation for activerecord-2.
Installing RDoc documentation for rack-1.
Installing RDoc documentation for actionpack-2.
Installing RDoc documentation for actionmailer-2.
Installing RDoc documentation for activeresource-2.
Installing RDoc documentation for rails-2.
执行rails-v,发现已更新成功
继续执行rake config/initializers/session_store.rb
rake db:migrate RAILS_ENV="production"
rake redmine:load_default_data RAILS_ENV="production"
在Redmine项目的命令行执行rake db:migrate RAILS_ENV="production",用来创建数据库,完成后应该创建43个表。还是在命令行执行rake redmine:load_default_data RAILS_ENV="production",指明当前项目运行环境为production,中间会提示选择语言,我们选择zh。
9.启动web服务,继续在命令行里
I→Rails Applications→Open Ruby Console Window栏目,然后会跳出dos窗口。在里面输入命令
cd redmine
ruby script/server-e production
10.然后我们就可以启动Redmine了,在浏览器中访问地址:localhost:3000/
安装完了,就可以使用admin用户登录,密码也是admin,登入后,发现页面又变成了英文的,在这里要
设置个人用户,修改语言为中文就可以了。然后进入管理页面,可以管理项目,用户,角,权限,问题状态,跟踪类型,流程等。
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论