搭建redmine环境

最近要开发一个项目管理系统,同事介绍个开源的项目管理系统先学习一下,一方面可以学习ruby,一方面也可以理解需求;白天搭建好了,回家在自己机器上再试一次。
1.安装JDK,netbeans,mysql
2.安装ruby,我用的版本是1.87
3.安装rails,rails版本用2.35,用命令行:gem install rails -v=2.3.5
4.命令行切换到mysql-2.8.1-x86-mswin32.gem所在的目录,执行gem install mysql-2.8.1-x86-mswin32.gem
5.把Mysql\bin下的libmySQL.dll,拷到Ruby\bin目录中
6.将程序导入netbeans中(习惯eclipse中的快捷键,可以在netbeans改成eclipse风格的)
7.修改项目中database.yml文件中的数据库配置
8.建库,建表(用命令),运行/调试 rake任务->db:create,建表:迁移数据库->到当前最新版本
9.在项目下执行rake generate_session_store,否则启动后会报错
10.运行服务器,用admin登录
11.运行单元测试,先执行rake gems:install RAILS_ENV=test,再建test库即可运行单元测试
11.在netbeans中安装rcov,直接装会报错,要先装DevKit,
     安装说明:http://github.com/oneclick/rubyinstaller/wiki/Development-Kit
     软件下载地址:http://rubyinstaller.org/downloads/

Installation Overview
Remove artifacts installed by the legacy DevKit devkit-3.4.5r3-20091110.7z.
Download the self-extracting DevKit-A.B.C-CCYYMMDD-sfx.exe archive.
Extract the DevKit contents into a directory with no spaces, e.g. – C:\DevKit.
Run the DevKit’s dk.rb init and install helper scripts to generate config.yml and enhance your installed Rubies.
Run the gem install rdiscount --platform=ruby smoke test.
Did the previous step fail? Please let us know!


Installation Detail – Step 1
If you previously installed the legacy DevKit devkit-3.4.5r3-20091110.7z, its artifacts were extracted into each Ruby installation and need to be manually removed. Remove the gcc.bat, make.bat, and sh.bat stub batch files in <RUBY_INSTALL_DIR>\bin and the <RUBY_INSTALL_DIR>\devkit subdirectory for each Ruby installation using the legacy DevKit.


Installation Detail – Step 2
The current DevKit is available at the RubyInstaller download page with older versions available at the archives page. As backup, check our GitHub downloads page.


Installation Detail – Step 3
Left double-click the self-extracting executable downloaded from Step 2 and choose a directory (without spaces) to install the DevKit artifacts into. For example, C:\DevKit. In the instructions that follow, the directory that you selected is identified as <DEVKIT_INSTALL_DIR>.


Installation Detail – Step 4
cd <DEVKIT_INSTALL_DIR> from Step 3 above.
ruby dk.rb init to generate the config.yml file to be used later in this Step. Your installed Rubies will be listed there (only those installed by a RubyInstaller package are detected at present).
edit the generated config.yml file to include installed Rubies not automagically discovered or remove Rubies you do not want to use the DevKit with.
[optional] ruby dk.rb review to review the list of Rubies to be enhanced to use the DevKit and verify the changes you made to it are correct.
finally, ruby dk.rb install to DevKit enhance your installed Rubies. This step installs (or updates) an operating_system.rb file into the relevant directory needed to implement a RubyGems pre_install hook and a devkit.rb helper library file into <RUBY_INSTALL_DIR>\lib\ruby\site_ruby.


Installation Detail – Step 5
Confirm your Ruby environment is correctly using the DevKit by running gem install rdiscount --platform=ruby. RDiscount should install correctly and you should see Temporarily enhancing PATH to include DevKit... in the screen messages. Next run ruby -rubygems -e "require 'rdiscount'; puts RDiscount.new('**Hello RubyInstaller**').to_html" to confirm that the rdiscount gem is working.

 

 

完成后安装rcov即可查看测试覆盖率

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值