redmine & ruby 在ubuntu 上的安装笔记

edmine & ruby 在ubuntu 上的安装笔记

 

1. 前提 gcc 环境是必要的

 

apt-get install build-essential

 

2. ruby 必要件安装

 

apt-get install ruby ri rdoc rake rubygems ruby-dev libmysqlclient16-dev libopenssl-ruby1.8

 

3. 安装 rails

 

gem install -v=2.1.2 rails

 

4. 安装mysql 驱动

 

gem install mysql

 

5. 从 svn 上取得 redmine

 

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

 

6. 创建数据库

 

mysql> create database redmine character set utf8;
Query OK, 1 row affected (0.08 sec)

 

7. 设置 mysql 联结

 

redmine-0.8# cp config/database.yml.example config/database.yml

redmine-0.8#vi config/database.yml

 

注意这一部分:

 

production:
  adapter: mysql
  database: redmine
  host: localhost
  username: root
  password: XXXXXX
  encoding: utf8

 

8. 建表

 

rake db:migrate RAILS_ENV="production"

 

出现:

 

Missing session secret. Please run 'rake config/initializers/session_store.rb' to generate one

按提示,gen一个就完了

 

9. 数据准备

 

redmine-0.8# rake redmine:load_default_data RAILS_ENV="production"
(in /websites/redmine-0.8)

Select language: bg, ca, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, lt, nl, no, pl, pt, pt-br, ro, ru, sk, sr, sv, th, tr, uk, vn, zh, zh-tw [en]
====================================
Default configuration data loaded.

 

10 . 启动服务器

 

ruby script/server webrick -e production

 

11. 登进去看看

 

http://xxxxx:3000

 

user/passwd: admin/admin

 

12. 建个project吧..

 

 

你可能感兴趣的:(mysql,SVN,ubuntu,Ruby,Rails)