Windows下安装Redmine
为food项目配置了项目管理平台,综合了trac、dotProject、Redmine等几个开源平台,最终选择了Redmine。Redmine主页http://www.redmine.org
本文介绍,以及最后的bug补丁,仅针对Redmine 1.2.1版本,不能确定后续版本是否需要同样操作。欢迎留言反馈。
==
下面是安装方法:
一、Redmine安装。
1、准备
安装之前请阅读:RailsInstaller简化了Rails在Windows上的安装过程
英文原文:RailsInstaller Provides Easy Rails on Windows Installation
作者:Rob Bazinet 译者:张龙
RailsInstaller向Windows开发者提供了一种便捷的方式以轻松、快速创建Ruby on Rails 3应用。到目前为止,Windows开发者需要自己搭建好Ruby、RubyGems、Rails以及SQLite才能开始创建Rails应用。多亏了来自Engine Yard的Nic Williams博士及其团队,现在一切都变得简单异常。
目前的RailsInstaller提供了如下功能:
- 通过向导的轻松安装
- Rails 3.0.3
- Ruby 1.8.7——p330
- SLQite 3.7.3
- Git 1.7.3.1
- DevKit
2、安装
注意:下面的操作要在联网的情况下进行。
转自:http://www.cppblog.com/giigie/archive/2011/07/31/152160.html
最近在一家公司实习。公司用的项目管理软件是开源的redmine,体验非常不错。我想这个东西不仅可以用来管理项目,也可以用来管理个人的学习工作进展啊。于是,我也在自己的虚拟机的2003 server 下安装。
之前为了安装wordpress,我已经在我的电脑上安装了 xampp。这是一个搭建服务器环境的傻瓜式安装包,里面集成了apache,php,mysql,phpMyAdmin,FileZilla FTP Server,Tomcat,这些组件可以选择安装。.
因为redmine是需要apache 和mysql的,所以正好。此外,redmine使用ruby写的,所以还需要ruby的环境。
配置ruby 的环境我选用的是railsinstaller 。
之前我在网上搜索安装redmine 的教程,配置ruby环境大多是用InstantRails。我实际用了一下,效果不太好。因为InstantRails从2007年开始就没有更新了,里面包含的很多组件版本都很旧,直接搭建的话需要升级各种组件,而且组件之间的依赖关系比较混乱,反正我是在里面绕了很多弯路。而且InstantRails 里面自带有很低版本的apache,mysql,phpMyAdmin,如果你电脑本来安装了这些,那么又要改这些服务的端口和对应的配置文件。总之一句话,InstantRails 已经过时了。
好了,现在开始进入正题吧。
1.去redmine的官方网站下载 redmine 的最新版本。我下载的的是redmine 1.2.1.然后弄清楚这个版本的需要的环境。Redmine 的网站的Guide »Installation Guide » 会清楚的告诉你这些事项的。
2.如果你的电脑上还没有apache ,php,mysql 建议你去下载xampp,如果有的话,跳过这步。
3.去railsinstaller 的官方网站去下载最新版的railsinstaller 。看它所包含的组件以及其版本。然后安装。
4.做好这些准备工作了。就可以开始配置redmine运行环境了。把redmine的解压到railsinstaller所产生的sites目录。在dos窗口进入sites\redmine目录下。
5.gem install rails -v=2.3.11 安装rails 2.3.11版本,这个redmine 1.2.1所要求的。
6.gem install rack -v=1.1.1 安装rack 1.1.1版本,这个redmine 1.2.1所要求的。
7.gem install -v=0.4.2 i18n 这个根据安装时返回的错误命令提示来决定。比如的我就是提示Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`
8.进入phpMyAdmin 创建数据库。执行以下三条sql 语句。
create database redmine character set utf8;
create user 'redmine'@'localhost' identified by 'my_password';
grant all privileges on redmine.* to 'redmine'@'localhost';
9.拷贝config/database.yml.example文件到config/database.yml,修改database.yml的内容 production:
adapter: mysql
database: redmine
host: localhost
username: redmine
password: my_password
Username 和password字段就是自己要设置的数据库的账号和密码。
10.回到dos 窗口下,设置Session Key,执行 rake generate_session_store
如果提示 mysql 错误,再执行如下语句 gem install mysql
以下是执行rake generate_session_store可能出现的错误,缺包,一次安装.
------------------------------------------------------------
Installing RDoc documentation for i18n-0.6.9...
unable to convert U+00E4 from UTF-8 to GBK for lib/i18n/tests/interpolation.rb, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to GBK for lib/i18n.rb, skipping
C:\Sites\redmine>rake generate_session_store
[31mCould not find gem 'rails (= 3.2.17) x86-mingw32' in the gems available on this machine.[0m
[33mRun `bundle install` to install missing gems.[0m
C:\Sites\redmine>gem install rails -v=3.2.17
Fetching: activesupport-3.2.17.gem (100%)
Fetching: activemodel-3.2.17.gem (100%)
Fetching: actionpack-3.2.17.gem (100%)
Fetching: activerecord-3.2.17.gem (100%)
Fetching: activeresource-3.2.17.gem (100%)
Fetching: actionmailer-3.2.17.gem (100%)
Fetching: railties-3.2.17.gem (100%)
Fetching: rails-3.2.17.gem (100%)
Successfully installed activesupport-3.2.17
Successfully installed activemodel-3.2.17
Successfully installed actionpack-3.2.17
Successfully installed activerecord-3.2.17
Successfully installed activeresource-3.2.17
Successfully installed actionmailer-3.2.17
Successfully installed railties-3.2.17
Successfully installed rails-3.2.17
8 gems installed
Installing ri documentation for activesupport-3.2.17...
Installing ri documentation for activemodel-3.2.17...
Installing ri documentation for actionpack-3.2.17...
Installing ri documentation for activerecord-3.2.17...
Installing ri documentation for activeresource-3.2.17...
Installing ri documentation for actionmailer-3.2.17...
Installing ri documentation for railties-3.2.17...
Installing ri documentation for rails-3.2.17...
file 'lib' not found
Installing RDoc documentation for activesupport-3.2.17...
Installing RDoc documentation for activemodel-3.2.17...
Installing RDoc documentation for actionpack-3.2.17...
Installing RDoc documentation for activerecord-3.2.17...
Installing RDoc documentation for activeresource-3.2.17...
Installing RDoc documentation for actionmailer-3.2.17...
Installing RDoc documentation for railties-3.2.17...
Installing RDoc documentation for rails-3.2.17...
file 'lib' not found
C:\Sites\redmine>rake generate_session_store
[31mCould not find gem 'selenium-webdriver (>= 0) x86-mingw32' in the gems available on this machine.[0m
[33mRun `bundle install` to install missing gems.[0m
C:\Sites\redmine>gem install selenium-webdriver
Fetching: ffi-1.9.3-x86-mingw32.gem (100%)
Fetching: childprocess-0.5.3.gem (100%)
Fetching: websocket-1.0.7.gem (100%)
Fetching: selenium-webdriver-2.42.0.gem (100%)
Successfully installed ffi-1.9.3-x86-mingw32
Successfully installed childprocess-0.5.3
Successfully installed websocket-1.0.7
Successfully installed selenium-webdriver-2.42.0
4 gems installed
Installing ri documentation for ffi-1.9.3-x86-mingw32...
Enclosing class/module 'moduleFFI' for class AbstractMemory not known
Enclosing class/module 'moduleFFI' for class NullPointerError not known
Enclosing class/module "classMemory" for alias put_" #name, "put_" #old); \
rb_define_alias(classMemory, "get_" #name, "get_" #old); \
rb_define_alias(classMemory, "put_u" #name, "put_u" #old); \
rb_define_alias(classMemory, "get_u" #name, "get_u" #old); \
rb_define_alias(classMemory, "write_" #name, "write_" #old); \
rb_define_alias(classMemory, "read_" #name, "read_" #old); \
rb_define_alias(classMemory, "write_u" #name, "write_u" #old); \
rb_define_alias(classMemory, "read_u" #name, "read_u" #old); \
rb_define_alias(classMemory, "put_array_of_" #name, "put_array_of_" #old); \
rb_define_alias(classMemory, "get_array_of_" #name, "get_array_of_" #old); \
rb_define_alias(classMemory, "put_array_of_u" #name, "put_array_of_u" #old); \
rb_define_alias(classMemory, "get_array_of_u" #name, "get_array_of_u" #old); \
rb_define_alias(classMemory, "write_array_of_" #name, "write_array_of_" #old); \
rb_define_alias(classMemory, "read_array_of_" #name, "read_array_of_" #old); \
rb_define_alias(classMemory, "write_array_of_u" #name, "write_array_of_u" #old); \
rb_define_alias(classMemory, "read_array_of_u" #name, "read_array_of_u" #old);
ALIAS(char, int8);
ALIAS(short, int16);
ALIAS(int, int32);
ALIAS(long_long, int64);
/*
* Document-method: put_float32
* call-seq: memory.put_float32offset, value)
* @param [Numeric] offset
* @param [Numeric] value
* @return [self]
* Put +value+ as a 32-bit float in memory at offset +offset+ (alias: #put_float).
*/
rb_define_method(classMemory, "put_float32", memory_put_float32, 2);
/*
* Document-method: get_float32
* call-seq: memory.get_float32(offset)
* @param [Numeric] offset
* @return [Float]
* Get a 32-bit float from memory at offset +offset+ (alias: #get_float).
*/
rb_define_method(classMemory, "get_float32", memory_get_float32, 1);
rb_define_alias(classMemory, "put_float put_float32 not known
Enclosing class/module "classMemory" for alias get_float get_float32 not known
Enclosing class/module "classMemory" for alias put_array_of_float put_array_of_float32 not known
Enclosing class/module "classMemory" for alias get_array_of_float get_array_of_float32 not known
Enclosing class/module "classMemory" for alias put_double put_float64 not known
Enclosing class/module "classMemory" for alias get_double get_float64 not known
Enclosing class/module "classMemory" for alias put_array_of_double put_array_of_float64 not known
Enclosing class/module "classMemory" for alias get_array_of_double get_array_of_float64 not known
Enclosing class/module "classMemory" for alias size total not known
Enclosing class/module 'moduleFFI' for class ArrayType not known
Enclosing class/module 'moduleFFI' for class Buffer not known
Enclosing class/module "BufferClass" for alias length total not known
Enclosing class/module 'moduleFFI' for module DataConverter not known
Enclosing class/module 'moduleFFI' for class DynamicLibrary not known
Enclosing class/module 'LibraryClass' for class Symbol not known
Enclosing class/module 'rbffi_TypeClass' for class Mapped not known
Enclosing class/module 'rbffi_StructLayoutClass' for class CharArray not known
Enclosing class/module "rbffi_StructLayoutCharArrayClass" for alias to_str to_s not known
Installing ri documentation for childprocess-0.5.3...
Installing ri documentation for websocket-1.0.7...
Installing ri documentation for selenium-webdriver-2.42.0...
Installing RDoc documentation for ffi-1.9.3-x86-mingw32...
Enclosing class/module 'moduleFFI' for class AbstractMemory not known
Enclosing class/module 'moduleFFI' for class NullPointerError not known
Enclosing class/module "classMemory" for alias put_" #name, "put_" #old); \
rb_define_alias(classMemory, "get_" #name, "get_" #old); \
rb_define_alias(classMemory, "put_u" #name, "put_u" #old); \
rb_define_alias(classMemory, "get_u" #name, "get_u" #old); \
rb_define_alias(classMemory, "write_" #name, "write_" #old); \
rb_define_alias(classMemory, "read_" #name, "read_" #old); \
rb_define_alias(classMemory, "write_u" #name, "write_u" #old); \
rb_define_alias(classMemory, "read_u" #name, "read_u" #old); \
rb_define_alias(classMemory, "put_array_of_" #name, "put_array_of_" #old); \
rb_define_alias(classMemory, "get_array_of_" #name, "get_array_of_" #old); \
rb_define_alias(classMemory, "put_array_of_u" #name, "put_array_of_u" #old); \
rb_define_alias(classMemory, "get_array_of_u" #name, "get_array_of_u" #old); \
rb_define_alias(classMemory, "write_array_of_" #name, "write_array_of_" #old); \
rb_define_alias(classMemory, "read_array_of_" #name, "read_array_of_" #old); \
rb_define_alias(classMemory, "write_array_of_u" #name, "write_array_of_u" #old); \
rb_define_alias(classMemory, "read_array_of_u" #name, "read_array_of_u" #old);
ALIAS(char, int8);
ALIAS(short, int16);
ALIAS(int, int32);
ALIAS(long_long, int64);
/*
* Document-method: put_float32
* call-seq: memory.put_float32offset, value)
* @param [Numeric] offset
* @param [Numeric] value
* @return [self]
* Put +value+ as a 32-bit float in memory at offset +offset+ (alias: #put_float).
*/
rb_define_method(classMemory, "put_float32", memory_put_float32, 2);
/*
* Document-method: get_float32
* call-seq: memory.get_float32(offset)
* @param [Numeric] offset
* @return [Float]
* Get a 32-bit float from memory at offset +offset+ (alias: #get_float).
*/
rb_define_method(classMemory, "get_float32", memory_get_float32, 1);
rb_define_alias(classMemory, "put_float put_float32 not known
Enclosing class/module "classMemory" for alias get_float get_float32 not known
Enclosing class/module "classMemory" for alias put_array_of_float put_array_of_float32 not known
Enclosing class/module "classMemory" for alias get_array_of_float get_array_of_float32 not known
Enclosing class/module "classMemory" for alias put_double put_float64 not known
Enclosing class/module "classMemory" for alias get_double get_float64 not known
Enclosing class/module "classMemory" for alias put_array_of_double put_array_of_float64 not known
Enclosing class/module "classMemory" for alias get_array_of_double get_array_of_float64 not known
Enclosing class/module "classMemory" for alias size total not known
Enclosing class/module 'moduleFFI' for class ArrayType not known
Enclosing class/module 'moduleFFI' for class Buffer not known
Enclosing class/module "BufferClass" for alias length total not known
Enclosing class/module 'moduleFFI' for module DataConverter not known
Enclosing class/module 'moduleFFI' for class DynamicLibrary not known
Enclosing class/module 'LibraryClass' for class Symbol not known
Enclosing class/module 'rbffi_TypeClass' for class Mapped not known
Enclosing class/module 'rbffi_StructLayoutClass' for class CharArray not known
Enclosing class/module "rbffi_StructLayoutCharArrayClass" for alias to_str to_s not known
Installing RDoc documentation for childprocess-0.5.3...
Installing RDoc documentation for websocket-1.0.7...
Installing RDoc documentation for selenium-webdriver-2.42.0...
C:\Sites\redmine>set RAILS_ENV=production
C:\Sites\redmine>rake db:migrate
[31mCould not find gem 'rack-openid (>= 0) x86-mingw32' in the gems available on this machine.[0m
[33mRun `bundle install` to install missing gems.[0m
C:\Sites\redmine>rake generate_session_store
[31mCould not find gem 'rack-openid (>= 0) x86-mingw32' in the gems available on this machine.[0m
[33mRun `bundle install` to install missing gems.[0m
C:\Sites\redmine>bundle install rack-openid
ERROR: "bundle install" was called with arguments ["rack-openid"]
Usage: "bundle install [OPTIONS]"
C:\Sites\redmine>gem install rack-openid
Fetching: ruby-openid-2.5.0.gem (100%)
Fetching: rack-openid-1.4.2.gem (100%)
Successfully installed ruby-openid-2.5.0
Successfully installed rack-openid-1.4.2
2 gems installed
Installing ri documentation for ruby-openid-2.5.0...
Installing ri documentation for rack-openid-1.4.2...
Installing RDoc documentation for ruby-openid-2.5.0...
Installing RDoc documentation for rack-openid-1.4.2...
C:\Sites\redmine>rake generate_session_store
[31mCould not find gem 'rake (~> 10.1.1) x86-mingw32' in the gems available on this machine.[0m
[33mRun `bundle install` to install missing gems.[0m
C:\Sites\redmine>gem install rake
Fetching: rake-10.3.2.gem (100%)
Successfully installed rake-10.3.2
1 gem installed
Installing ri documentation for rake-10.3.2...
Installing RDoc documentation for rake-10.3.2...
C:\Sites\redmine>rake generate_session_store
[31mCould not find gem 'rake (~> 10.1.1) x86-mingw32' in the gems available on this machine.[0m
[33mRun `bundle install` to install missing gems.[0m
C:\Sites\redmine>gem install rake -v=10.1.1
Fetching: rake-10.1.1.gem (100%)
Successfully installed rake-10.1.1
1 gem installed
Installing ri documentation for rake-10.1.1...
Installing RDoc documentation for rake-10.1.1...
C:\Sites\redmine>rake generate_session_store
[31mCould not find gem 'jquery-rails (~> 2.0.2) x86-mingw32' in the gems available on this machine.[0m
[33mRun `bundle install` to install missing gems.[0m
C:\Sites\redmine>gem install jquery-rails -v=2.0.2
Fetching: jquery-rails-2.0.2.gem (100%)
Successfully installed jquery-rails-2.0.2
1 gem installed
Installing ri documentation for jquery-rails-2.0.2...
Installing RDoc documentation for jquery-rails-2.0.2...
C:\Sites\redmine>rake generate_session_store
[31mCould not find gem 'coderay (~> 1.1.0) x86-mingw32' in the gems available on this machine.[0m
[33mRun `bundle install` to install missing gems.[0m
C:\Sites\redmine>gem install coderay -v=1.1.0
WARNING: Error fetching data: SocketError: getaddrinfo: ������������������ (http://rubygems.org/specs.4.8.gz)
ERROR: Could not find a valid gem 'coderay' (= 1.1.0) in any repository
WARNING: Error fetching data: SocketError: getaddrinfo: ������������������ (http://rubygems.org/latest_specs.4
.8.gz)
ERROR: Possible alternatives: coderay
C:\Sites\redmine>gem install coderay
Fetching: coderay-1.1.0.gem (100%)
Successfully installed coderay-1.1.0
1 gem installed
Installing ri documentation for coderay-1.1.0...
Installing RDoc documentation for coderay-1.1.0...
C:\Sites\redmine>rake generate_session_store
[31mCould not find gem 'fastercsv (~> 1.5.0) x86-mingw32' in the gems available on this machine.[0m
[33mRun `bundle install` to install missing gems.[0m
C:\Sites\redmine>gem install fastercsv -v=1.5.0
Fetching: fastercsv-1.5.0.gem (100%)
Successfully installed fastercsv-1.5.0
1 gem installed
Installing ri documentation for fastercsv-1.5.0...
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to GBK for lib/faster_csv.rb, skipping
Installing RDoc documentation for fastercsv-1.5.0...
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to GBK for lib/faster_csv.rb, skipping
C:\Sites\redmine>rake generate_session_store
[31mCould not find gem 'builder (= 3.0.0) x86-mingw32' in the gems available on this machine.[0m
[33mRun `bundle install` to install missing gems.[0m
C:\Sites\redmine>gem install builder -v=3.0.0
Fetching: builder-3.0.0.gem (100%)
Successfully installed builder-3.0.0
1 gem installed
Installing ri documentation for builder-3.0.0...
Installing RDoc documentation for builder-3.0.0...
C:\Sites\redmine>rake generate_session_store
[31mCould not find gem 'awesome_nested_set (= 2.1.6) x86-mingw32' in the gems available on this machine.[0m
[33mRun `bundle install` to install missing gems.[0m
C:\Sites\redmine>gem install awesome_nested_set -v=2.1.6
Fetching: awesome_nested_set-2.1.6.gem (100%)
Successfully installed awesome_nested_set-2.1.6
1 gem installed
Installing ri documentation for awesome_nested_set-2.1.6...
unable to convert U+00A0 from UTF-8 to GBK for lib/awesome_nested_set/helper.rb, skipping
Installing RDoc documentation for awesome_nested_set-2.1.6...
unable to convert U+00A0 from UTF-8 to GBK for lib/awesome_nested_set/helper.rb, skipping
C:\Sites\redmine>
------------------------------------------------------------
11.然后set RAILS_ENV=production
rake db:migrate
rake redmine:load_default_data
执行rake load_default_data RAILS_ENV="production" 完后,会提示Select language: bg, bs, ca, cs, da, de, el, en, en-GB, es, eu, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mn, nl,no, pl, pt, pt-BR, ro, ru, sk, sl, sr, sr-CY, sv, th, tr, uk, vi, zh, zh-TW [en] zh
输入zh选择中文
12.最后ruby script/server webrick -e production 启动。以后每次开机后都需要这句来启动。
13.打开浏览器 输入 http://localhost:3000 。账号,密码都是 admin 。
14.安装完了,就可以使用admin用户登录,密码也是admin,登入后,发现页面又变成了英文的,在这里要设置个人用户,修改语言为中文就可以了。然后进入管理页面,可以管理项目,用户,角色,权限,问题状态,跟踪类型,流程等。
上面的步骤是比较顺利的,如果是组件的版本有问题,这篇博客比较有价值http://like-eagle.iteye.com/blog/847218。
如果还有问题,你可以根据问题的提示去google.
下面我简单翻译一下redmine 1.2.1 官方的安装向导。(仅 windows 平台)
官方发行版已经在其 vendor 目录包含了适当的Rails 版本,所以不需要为此做什么。
你也可以查看redmine 的版本,运行一下命令特地的为它安装某个版本的组件:
gem install rails -v=2.3.11
安装rack
gem install rack -v=1.1.0
兼容性提示
· Ruby 1.9 版本目前还不支持,但你必须安装ruby 1.8.x 以上的版本。
· RubyGems 1.3.7 或者更高版本有以下限制 :
o Rails 2.3.5 与rubygems 1.5.0或者更高的版本工作会失败,请使用rubygems的更早的版本!
o Rails 2.3.11 与rubygems 1.7.9或者更高版本工作会失败,请使用rubygems更早的版本 !
· 需要Rake 0.8.7 (rake 0.9.x 尚未被 Rails 支持)
· 需要Rack1.1.x , 1.1.0 版本有引用 (#8416)所描述的bug. 同其他版本的迁移会失败.
· Mongrel1.1.5 需要补丁 #7688 才能和 Rails 2.3.11工作. 在升级的情况下,其他问题可能会出现 (#7857).
· Redmine >= 1.0.5版本需要I18n 0.4.2
数据库
· 需要mysql 5.0或者更高的版本。MySQL 5.0 or higher (建议)
安装步骤
1.获得redmine 的源代码或者发行包。参见 Download.
2.用mysql 创建一个空的数据库和一个名为 redmine的用户,例如:
create database redmine character set utf8;
create user 'redmine'@'localhost' identified by 'my_password';
grant all privileges on redmine.* to 'redmine'@'localhost';
对于mysql 5.0.2 的版本 跳过create user ,用这个代替grant all privileges on redmine.* to 'redmine'@'localhost' identified by 'my_password';
3.复制Copy config/database.yml.example改为 config/database.yml ,编辑文件配置数据库设置。例如mysql:
production:
adapter: mysql
database: redmine
host: localhost
username: redmine
password: my_password
如果服务器没有工作在3306端口,用下面的配置代替:
production:
adapter: mysql
database: redmine
host: localhost
port: 3307
username: redmine
password: my_password
4.生成会话密钥:
rake generate_session_store
5.创建数据库:
AILS_ENV=production rake db:migrate
这将创建一个管理员账户。
如果你得到以下错误:
Rake aborted!
no such file to load -- net/https
你需要安装libopenssl-ruby1.8
6.向数据库插入默认的配置数据
RAILS_ENV=production rake redmine:load_default_data
7.运行使用ruby script/server webrick -e production命令
配置:
从1.2.0版本开始,redmine的配置都在config/configuration.yml文件里。不要忘记修改了默认配置都需要重启服务。
Window 用户的特别提醒
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
等命令已经变成了
set RAILS_ENV=production
rake db:migrate
rake redmine:load_default_data
如果你需要安装mysql ,使用如下命令:
gem install mysql
在一些情况下,你需要复制libmysql.dll到你的ruby/bin目录,但不是所有的libmysql.dll 都适合,请参考
http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll
二、Redmine集成SVN
参考http://www.cnblogs.com/Quincy/archive/2011/06/03/2070479.html
进入Redmine目录下Config,有文件“configuration.yml.example”,复制该文件重命名“configuration.yml”,修改其中的SVN配置
scm_subversion_command: svn # (default: svn),
这里需要设置在环境变量PATH中添加svn所在的目录
再重启服务器,配置SCM,选用SVN设置库路径,就可以看到代码了。
三、Redmine配置上传文件存储地址、邮件服务器等
参考上步,在这个文件中有相应的配置选项。
注意:configuration.yml 中无用的项不用写,有严格的格式
下面这两句是一个配置例子:
default:
attachments_storage_path: D:\RedmineFiles
scm_subversion_command: svn
四、Redmine以windows服务方式启动
参考 http://bufeifang.blog.163.com/blog/static/558981512009421113134391/
Redemine的启动是用命令行执行的,在Redmine根目录下执行:ruby script/server -e production即可,但是执行后不能关闭控制台,不然服务就会关闭,这对于重启服务器来说是一件很麻烦的事情,每次都要手动启动Redmine;
既然Windows有服务,可自启,那就安装成服务,安装步骤如下:
A、先安装mongrel_service,在在C:\InstantRails\ruby\bin目录下运行:gem install mongrel_service,此过程中会下载一些其他必须的包;
B、使用mongrel_service将Redmine安装为服务:mongrel_rails service::install -N RedMine -c C:\redmine -p 3000 –e production;C:\redmine是具体的目录,参考修改;
C、安装服务后,查看-e后的参数是不是production,如果不是production而是development,则在注册表中把参数手动改为production即可,修改方法是:在“开始→运行”中键入“regedit.exe”,打开“注册表编辑器”,展开分支“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services”,在下面都是系统服务的名称,右侧窗格中显示的就是服务的详细参数。找到ImagePath项,修改保存后在服务列表中启动服务,并把服务设置自动启动。
然后修改启动方式为自动启动,并添加MySQL服务为其依赖服务(如果你的MySQL服务器不是本机就不用麻烦了):
sc config RedMine start= auto depend= MySQL
注意:上面命令=后有一个空格。
注意,执行sc config系列指令,服务必须是未启动的才行,否则会出错。
将来如果想去掉这个服务,只要执行:
mongrel_rails service::remove -N RedMine
五、Redmine服务方式不能正常运行bug补丁
注意:
补丁(很重要)
上面第四步操作完以后,Redmine并不能正常运行,log中有这日志
A NoMethodError occurred in account#login
参见 http://www.redmine.org/issues/7857
解决办法:
由 Alfredo Bonilla
Hi everybody, we are trying to upgrade to 1.2 and we are having both problems here described... the problem is that after applying what here is detailed... there is no way... problems still remain.
Please, let me know if I'm missing something or doing something wrong!!):
- Copy mongrel.rb (https://gist.github.com/826692), patch_for_mongrel.rb (http://www.redmine.org/attachments/4699/patch_for_mongrel.rb) and rails_6440_patch.rb (http://www.redmine.org/attachments/6146/rails_6440_patch.rb) files in /<my-redmine-path>/config/initializers
Thx in advance
- mongrel.rb is mandatory to get mongrel 1.1.5 work with RoR 2.3.11. It's the only patch I'm actually running with.
- patch_for_mongrel.rb might be useful for a sub-URL Redmine setup ?
- rails_6440_patch.rb might be useful at start to prevent the hereby discussed issue (maybe only in case of a Redmine upgrade) but can be remove after some time
Thanks for clarifications. As I commented in http://www.redmine.org/issues/7688, our problem was not having installed the mongrel gems. Once installed, just with mongrel.rb in /config/initializers, everything is working. :)
六、Q&A
1、Redmine Sprints 插件 官方主页 https://github.com/software-project/scrum-pm
- by 一个农夫 -
文档信息
作者:一个农夫 ( www.cnblogs.com/afarmer )
链接:http://www.cnblogs.com/afarmer/archive/2011/08/06/2129126.html
欢迎转载,请保留文档信息。
rake aborted!
no such file to load -- bundler/setup
然后根据网上说的,执行
gem install bundler后,出现了这样的错误
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 301 fetching http://gems.rubyforge.org/yaml
这个是什么原因?