`
mmdev
  • 浏览: 12916861 次
  • 性别: Icon_minigender_1
  • 来自: 大连
文章分类
社区版块
存档分类
最新评论

redmine开发环境建立笔记

阅读更多

The following steps are based on WinXP sp3 platform.

1 install instantrails2.0

2 update rails as following:

C:\InstantRails-2.0\ruby>gem update --system

C:\InstantRails-2.0\ruby>gem update rails --include-dependencies --source http://gems.rubyonrails.org/

note that you need to specify the source, or else, the update will timeout always.

by default, the rails version is 2.0.2, if you update rails successfully, version will be 2.3.3

C:\InstantRails-2.0\rails_apps\redmine>rails -v
Rails 2.3.3

if you see the error as:

ERROR: Error installing rails:
actionpack requires rack (~> 1.0.0, runtime)
Nothing to update

then you need to install rack first, try to download rack from website:

http://rubyforge.org/frs/?group_id=3113&release_id=42199

say, you put it in c:\rack\rack-1.0.0.gem

cd c:\rack

gem install rack-1.0.0.gem

if you see error as:

ERROR: Error installing rails:
rails requires rake (>= 0.8.3, runtime)

then you need to install rake 0.8.3, try to download rake from website:

http://rake.rubyforge.org/

cd c:\rake

gem install rake-0.8.3.gem

3 checkout redmine project stable version 0.9:

svn co http://redmine.rubyforge.org/svn/branches/0.9-stable redmine-0.9

4 copy redmine project to rails_apps directory, remove all hidden .svn directories.

5 find files as *example, and rename all these files by remove "example" word, for example, rename \InstantRails-2.0\rails_apps\redmine\config\database.yml.example to database.yml

6start instantrails.exe(make sure mysql server was started successfully)

7create databasesin mysql for redmine:

create database redmine character set utf8;
create database redmine_development character set utf8;
create database redmine_test character set utf8;

8 imports data

cd remine

rake db:migrate RAILS_ENV="development"
rake load_default_data RAILS_ENV="development"

if you see error like:

Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, update your RA
ILS_GEM_VERSION setting in config/environment.rb for the Rails version you do ha
ve installed, or comment out RAILS_GEM_VERSION to use the latest version install
ed.

you need to modify enviroment.rb as

# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.3' unless defined? RAILS_GEM_VERSION

if you see error like:

"A key is required to write a cookie containing the session data. Use config.action_controller.session = {:key => "_myapp_session", :secret => "some secret phrase"} in config/environment.rb"

please do as the suggestion, add following config to enviroment.rb file:

config.action_controller.session = { :key => "_redmine_session", :secret => "aa3be4f950045ce76451b8197bf06b6d" }

9 I->Rails Applications->Manage Rails Applications, choose redmine and start it with Mongrel.

if everything is fine, you will see the following message on command line:

** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
C:/INSTAN~1.0/ruby/lib/ruby/gems/1.8/gems/rails-2.3.3/lib/rails/gem_dependency.r
b:119:Warning: Gem::Dependency#version_requirements is deprecated and will be re
moved on or after August 2010. Use #requirement
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready. INT => stop (no restart).
** Mongrel 1.1.2 available at 0.0.0.0:3000
** Use CTRL-C to stop.

this means redmineproduct is running, youcould visit itjust by clicking http://localhost:3000/,

you will see webpage the same style as the redmine project home page:

http://www.redmine.org/

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics