redmine Win7下安装部署

 

安装步骤如下文

http://www.cnblogs.com/espie/archive/2011/05/01/2034135.html

 

遇到的问题

 

--问题1------------------------------------------------------------

D:\redmine>rake db:migrate

2 (in D:/redmine)
3 rake aborted!
4 syntax error on line 8, col 2: `  encoding: utf8'
5   
6 (See full trace by running task with --trace)

修改redmine目录下config中的database.yml 配置mysql连接密码时应在密码前加一个空格

 

 

1 production:
2   adapter: mysql
3   database: redmine
4   host: localhost
5   username: jif
6   password: 123456
7   encoding: utf8
--问题2---------------------------------------------------------

如果出现以下异常:

rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
WARNING: 'task :t, arg, :needs => [deps]' is deprecated.  Please use 'task :t, [
args] => [deps]' instead.
    at D:/Downloads/ruby/redmine-1.1.3/lib/tasks/email.rake:170

 

这是因为rake版本太高造成的。
解决办法:
先执行gem list rake 查看rake版本。若果高于0.8.7那就是太高了(比方说0.9.0)。
这样的话就需要卸载0.9.0的,安装0.8.7的。
gem uninstall rake -v=0.9.0
gem install rake -v=0.8.7

 

 

配东西最麻烦,雨过天晴呀!!!!!!!!!!!!!

 

 

-错误---------------------------------------------------------------------------------------

Added by {{author}} {{age}} ago. Updated {{value}} ago.

gem的i18n只能使用0.4.2,而我的i18n是0.5.0

最后在redmine的问题解决中也找到了问题所在,记录下,以备查http://www.redmine.org/issues/7013

      #gem  install i18n -v=0.4.2
      #gem  uninstall i18n -v=0.5.0

------------------------------------------------------------------------------------------------

 

 

运行缓慢解决办法之一----------------------------------------------------------------------------

1.  替换其自带的服务器webrick 为mongrel,方法:    

gem install mongrel

2. 更改%redmine安装路径%\config\environments目录下production.rb文件:

config.cache_classes = false

改为:

config.cache_classes = true

3. 运行

ruby script/server -e production

 

 

 -redmine升级日志------------------------------------------------------------------------------------------------

 

------------------------------------------
Microsoft Windows [版本 6.1.7600]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

 

C:\Users>cd..

C:\>d:

D:\>cd Redmine

D:\Redmine>cd redmine-1.2.1

D:\Redmine\redmine-1.2.1>rake config/initializers/session_store.rb
(in D:/Redmine/redmine-1.2.1)

D:\Redmine\redmine-1.2.1>
D:\Redmine\redmine-1.2.1>rake db:migrate RAILS_ENV=production
(in D:/Redmine/redmine-1.2.1)
rake aborted!
RubyGem version error: rack(1.0.1 not ~> 1.1.0)

(See full trace by running task with --trace)


D:\Redmine\redmine-1.2.1>rake db:migrate RAILS_ENV=production
(in D:/Redmine/redmine-1.2.1)
rake aborted!
RubyGem version error: rack(1.0.1 not ~> 1.1.0)

(See full trace by running task with --trace)

D:\Redmine\redmine-1.2.1>


D:\Redmine\redmine-1.2.1>gem install rails -v=2.3.5
Successfully installed rails-2.3.5
1 gem installed
Installing ri documentation for rails-2.3.5...
Installing RDoc documentation for rails-2.3.5...

D:\Redmine\redmine-1.2.1>gem update rack
Updating installed gems
Updating rack
Fetching: rack-1.3.1.gem (100%)
Successfully installed rack-1.3.1
Gems updated: rack
Installing ri documentation for rack-1.3.1...
Installing RDoc documentation for rack-1.3.1...

D:\Redmine\redmine-1.2.1>rake db:migrate RAILS_ENV=production
(in D:/Redmine/redmine-1.2.1)
rake aborted!
RubyGem version error: rack(1.0.1 not ~> 1.1.0)

(See full trace by running task with --trace)

D:\Redmine\redmine-1.2.1>gem install rails -v=2.3.11
Fetching: activesupport-2.3.11.gem (100%)
Fetching: activerecord-2.3.11.gem (100%)
Fetching: rack-1.1.2.gem (100%)
Fetching: actionpack-2.3.11.gem (100%)
Fetching: actionmailer-2.3.11.gem (100%)
Fetching: activeresource-2.3.11.gem (100%)
Fetching: rails-2.3.11.gem (100%)
Successfully installed activesupport-2.3.11
Successfully installed activerecord-2.3.11
Successfully installed rack-1.1.2
Successfully installed actionpack-2.3.11
Successfully installed actionmailer-2.3.11
Successfully installed activeresource-2.3.11
Successfully installed rails-2.3.11
7 gems installed
Installing ri documentation for activesupport-2.3.11...
Installing ri documentation for activerecord-2.3.11...
Installing ri documentation for rack-1.1.2...
Installing ri documentation for actionpack-2.3.11...
Installing ri documentation for actionmailer-2.3.11...
Installing ri documentation for activeresource-2.3.11...
Installing ri documentation for rails-2.3.11...
Installing RDoc documentation for activesupport-2.3.11...
Installing RDoc documentation for activerecord-2.3.11...
Installing RDoc documentation for rack-1.1.2...
Installing RDoc documentation for actionpack-2.3.11...
Installing RDoc documentation for actionmailer-2.3.11...
Installing RDoc documentation for activeresource-2.3.11...
Installing RDoc documentation for rails-2.3.11...

D:\Redmine\redmine-1.2.1>rake db:migrate RAILS_ENV=production
(in D:/Redmine/redmine-1.2.1)
==  ChangeUsersMailNotificationToString: migrating ============================
-- rename_column(:users, :mail_notification, :mail_notification_bool)
   -> 1.1240s
-- add_column(:users, :mail_notification, :string, {:null=>false, :default=>""})

   -> 0.3680s
-- remove_column(:users, :mail_notification_bool)
   -> 0.3370s
==  ChangeUsersMailNotificationToString: migrated (2.3820s) ===================

==  UpdateMailNotificationValues: migrating ===================================
==  UpdateMailNotificationValues: migrated (0.0000s) ==========================

==  AddIssuesNestedSetsColumns: migrating =====================================
-- add_column(:issues, :parent_id, :integer, {:default=>nil})
   -> 1.3730s
-- add_column(:issues, :root_id, :integer, {:default=>nil})
   -> 0.9690s
-- add_column(:issues, :lft, :integer, {:default=>nil})
   -> 0.8980s
-- add_column(:issues, :rgt, :integer, {:default=>nil})
   -> 0.9990s
==  AddIssuesNestedSetsColumns: migrated (4.9850s) ============================

==  AddIndexOnIssuesNestedSet: migrating ======================================
-- add_index(:issues, [:root_id, :lft, :rgt])
   -> 0.9580s
==  AddIndexOnIssuesNestedSet: migrated (0.9620s) =============================

==  ChangeChangesPathLengthLimit: migrating ===================================
-- change_column(:changes, :path, :text, {:null=>true, :default=>nil})
   -> 5.4880s
-- change_column(:changes, :path, :text, {:null=>false})
   -> 3.6440s
-- change_column(:changes, :from_path, :text)
   -> 2.4480s
==  ChangeChangesPathLengthLimit: migrated (29.1610s) =========================

==  EnableCalendarAndGanttModulesWhereAppropriate: migrating ==================
==  EnableCalendarAndGanttModulesWhereAppropriate: migrated (18.4560s) ========

==  AddUniqueIndexOnMembers: migrating ========================================
-- add_index(:members, [:user_id, :project_id], {:unique=>true})
   -> 0.4830s
==  AddUniqueIndexOnMembers: migrated (0.8810s) ===============================

==  AddCustomFieldsVisible: migrating =========================================
-- add_column(:custom_fields, :visible, :boolean, {:null=>false, :default=>true}
)
   -> 0.2320s
==  AddCustomFieldsVisible: migrated (0.2610s) ================================

==  ChangeProjectsNameLimit: migrating ========================================
-- change_column(:projects, :name, :string, {:null=>false, :limit=>nil, :default
=>""})
   -> 0.2760s
==  ChangeProjectsNameLimit: migrated (0.2830s) ===============================

==  ChangeProjectsIdentifierLimit: migrating ==================================
-- change_column(:projects, :identifier, :string, {:limit=>nil})
   -> 0.2090s
==  ChangeProjectsIdentifierLimit: migrated (0.2130s) =========================

==  AddWorkflowsAssigneeAndAuthor: migrating ==================================
-- add_column(:workflows, :assignee, :boolean, {:null=>false, :default=>false})
   -> 0.3200s
-- add_column(:workflows, :author, :boolean, {:null=>false, :default=>false})
   -> 0.2720s
==  AddWorkflowsAssigneeAndAuthor: migrated (0.7160s) =========================

==  AddUsersSalt: migrating ===================================================
-- add_column(:users, :salt, :string, {:limit=>64})
   -> 0.1910s
==  AddUsersSalt: migrated (0.1950s) ==========================================

==  SaltUserPasswords: migrating ==============================================
-- Salting user passwords, this may take some time...
   -> 12.4270s
==  SaltUserPasswords: migrated (12.4310s) ====================================

==  AddRepositoriesPathEncoding: migrating ====================================
-- add_column(:repositories, :path_encoding, :string, {:limit=>64, :default=>nil
})
   -> 0.2210s
==  AddRepositoriesPathEncoding: migrated (0.2250s) ===========================

==  ChangeRepositoriesPasswordLimit: migrating ================================
-- change_column(:repositories, :password, :string, {:limit=>nil, :default=>""})

   -> 0.1970s
==  ChangeRepositoriesPasswordLimit: migrated (0.2070s) =======================

==  ChangeAuthSourcesAccountPasswordLimit: migrating ==========================
-- change_column(:auth_sources, :account_password, :string, {:limit=>nil, :defau
lt=>""})
   -> 0.3680s
==  ChangeAuthSourcesAccountPasswordLimit: migrated (0.3710s) =================

==  ChangeJournalDetailsValuesToText: migrating ===============================
-- change_column(:journal_details, :old_value, :text)
   -> 0.5440s
-- change_column(:journal_details, :value, :text)
   -> 0.5030s
==  ChangeJournalDetailsValuesToText: migrated (1.0560s) ======================

==  AddRepositoriesLogEncoding: migrating =====================================
-- add_column(:repositories, :log_encoding, :string, {:limit=>64, :default=>nil}
)
   -> 0.1880s
==  AddRepositoriesLogEncoding: migrated (0.1930s) ============================

==  CopyRepositoriesLogEncoding: migrating ====================================
==  CopyRepositoriesLogEncoding: migrated (0.3890s) ===========================

==  AddIndexToUsersType: migrating ============================================
-- add_index(:users, :type)
   -> 0.2370s
==  AddIndexToUsersType: migrated (0.2410s) ===================================

==  AddRolesIssuesVisibility: migrating =======================================
-- add_column(:roles, :issues_visibility, :string, {:null=>false, :limit=>30, :d
efault=>"default"})
   -> 0.1830s
==  AddRolesIssuesVisibility: migrated (0.1880s) ==============================

==  AddIssuesIsPrivate: migrating =============================================
-- add_column(:issues, :is_private, :boolean, {:null=>false, :default=>false})
   -> 0.8170s
==  AddIssuesIsPrivate: migrated (0.8220s) ====================================

==  AddRepositoriesExtraInfo: migrating =======================================
-- add_column(:repositories, :extra_info, :text)
   -> 0.1760s
==  AddRepositoriesExtraInfo: migrated (0.1790s) ==============================


D:\Redmine\redmine-1.2.1>rake tmp:cache:clear
(in D:/Redmine/redmine-1.2.1)

D:\Redmine\redmine-1.2.1>rake tmp:sessions:clear
(in D:/Redmine/redmine-1.2.1)

D:\Redmine\redmine-1.2.1>ruby script/server webrick -e production
=> Booting WEBrick
=> Rails 2.3.11 application starting on http://0.0.0.0:3000/
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-07-21 15:18:50] INFO  WEBrick 1.3.1
[2011-07-21 15:18:50] INFO  ruby 1.8.7 (2011-02-18) [i386-mingw32]
[2011-07-21 15:18:50] INFO  WEBrick::HTTPServer#start: pid=6536 port=3000

 

 

 

posted @ 2011-06-22 13:09  glory.xu  阅读(2200)  评论(0编辑  收藏  举报