Redmine开发帮助
这里先零星记录二次开发用得上的知识点:
1、windows下开发环境,参考此文。最好使用rubyinstaller安装,注意选择版本。或者直接安装railsinstaller。
2、获取issue自定义字段内容,参考此文:
Every customizable redmine object has
custom_field_valuesfield, that value is array ofCustomFieldValue. CustomFieldValue contains current value, custom field description and customized object.Needed values i reads and alters by sort out. May be it's not best variant, but i acquainted with ruby language not so long ago.
Method for reading custom fields values:
def object_custom_field_value(object, field_name)
object.custom_field_values.each do |field|
if field.custom_field.name == field_name
return field.value
end
end
endAnd for changing:
def object_custom_field_set_value(object, field_name, value)
object.custom_field_values.each do |field|
if field.custom_field.name == field_name
field.value = value
end
end
end
3、bundle源修改
方法一:
bundle config --delete 'mirror.https://rubygems.org/' # 删除全局变量
bundle config 'mirror.https://rubygems.org' 'https://ruby.taobao.org'
2016.12.29设置后运行bundle install也失效,需将taobao的源更新至aliyun
bundle config 'mirror.https://rubygems.org' 'http://mirrors.aliyun.com/rubygems/'
bundle config 'mirror.http://mirrors.aliyun.com/rubygems/' 'http://gems.ruby-china.org/' # 2017.1.7 发现gems.ruby-china.org好用。
方法二:
在Gemfile里加入:source 'http://mirrors.aliyun.com/rubygems/'
4、gem install rails --version 4.2.6 --no-ri --no-rdoc 失败的解决方法
原因还是因为默认的源地址不对,gem sources可查看gem使用的服务器地址。修改:
gem sources -a http://mirrors.aliyun.com/rubygems/ --remove https://rubygems.org/
20170107 update: 因为ruby版本的原因,会出现“bad response Not Found 404 (http://ruby.taobao.org/specs.4.8.gz)”错误,修改:
gem sources -a http://gems.ruby-china.org/ -V
C:\Sites>gem install rails --version 4.2.6 --no-ri --no-rdoc
Fetching: activesupport-4.2.6.gem (100%)
Successfully installed activesupport-4.2.6
Fetching: actionview-4.2.6.gem (100%)
Successfully installed actionview-4.2.6
Fetching: actionpack-4.2.6.gem (100%)
Successfully installed actionpack-4.2.6
Fetching: activejob-4.2.6.gem (100%)
Successfully installed activejob-4.2.6
Fetching: actionmailer-4.2.6.gem (100%)
Successfully installed actionmailer-4.2.6
Fetching: activemodel-4.2.6.gem (100%)
Successfully installed activemodel-4.2.6
Fetching: activerecord-4.2.6.gem (100%)
Successfully installed activerecord-4.2.6
Fetching: railties-4.2.6.gem (100%)
Successfully installed railties-4.2.6
Fetching: rails-4.2.6.gem (100%)
Successfully installed rails-4.2.6
9 gems installed
5、bundle与gem
6、创建插件框架
ruby htdocs/script/rails generate redmine_plugin Polls # database connect error, maybe need to config first
6、帮助文档
自己生成chm帮助文档(参考1、参考2),前提是已安装HTML HELP WORKSHOP:
To create the documentation for Ruby, go to the Ruby source directory (\src\ruby-x.x.x-pxxx) in the console and enter:
rdoc -f [format] -o [destination-folder].To create the documentation for Rails, go to the ruby gems directory (i.e. \lib\ruby\gems\1.8\gems) and enter:
rdoc -f [format] -x test/* -x template/* -o [destination-folder] action* active* rails-*.The extra argument
-x template/*is needed here to prevent errors from occurring during compilation, as discussed here. This problem occurs for both html and chm compilation.
我的实例:
D:\App\Coder\RailsInstaller\Ruby2.1.0\lib\ruby\gems\2.1.0\gems>rdoc -f chm -x test/* -x template/* -x rails-4.2.5.1/* -o d:\rails4.2.6.chm action* active* rails-*
也可直接下载ruby文档。
7、Rubymine设置github,参考此文,主要几步:
To use GitHub integration, perform these general steps
- Enable the GitHub bundled plugin to get access to GitHub integration.
- Register your GitHub account in RubyMine.
- Clone repositories from GitHub.
- Publish your projects on GitHub.
- Share code snippets through Git gists.
Redmine开发帮助的更多相关文章
- 小团队开发管理工具:gitlab+redmine+testlink+jenkins
由于工作需要,需要为团队搭建一个高效可用的开发管理平台.现在可用的开发管理工具很多开源的.商业的,网上也有很多博客和文章.经过2周的学习比较,再结合自己的项目特点,最后选定工具集:gitlab+red ...
- Redmine迁移至华为软件开发云-项目管理
一.方案概述 要想将Redmine中某个项目的数据导入到华为软件开发云(以下简称开发云),如果说是按照Redmine中的数据一条一条的在开发云中新建出来,肯定不是一个明智的方案,下面就是给大家介绍一个 ...
- Redmine是用Ruby开发的基于web的项目管理软件,是用ROR框架开发的一套跨平台项目管理系统
- redmine整合GIT版本库
redmine整合GIT版本库 服务器的环境: Ubuntu 11.10 64位 Redmine 1.4.5.stable.10943 git version 1.7.5.4 + gitolite ...
- 用户故事驱动的敏捷开发 – 2. 创建backlog
本系列的第一篇[用户故事驱动的敏捷开发 – 1. 规划篇]跟大家分享了如何使用用户故事来帮助团队创建需求的过程,在这一篇中,我们来看看如何使用这些用户故事和功能点形成产品backlog.产品backl ...
- Testlink与Redmine关联
TestLink是一个开源的测试管理工具,它可以有效地管理整个测试流程(测试需求, 测试计划, 测试用例, 测试执行, 测试结果分析),但不能和开发流程统一起来,从而不能及时参与到开发中去,不能使项目 ...
- Bitnami Redmine插件记录
1.bitnami安装时自带了开发环境,如ruby.rails.devkit. 为了版本兼容,应使用bitnami的命令行. 2.通过use_redmine启动命令行:运行Bitnami\redmin ...
- 掌握Redmine
一个带有建议.技巧和最佳实践的全面指导和易懂易学的结构. 掌握Redmine 版权©2013 Packt出版 前言(略) 1.熟悉Redmin 我们尝试去做一个新的网站应用程序的时候,回去询问一些了解 ...
- Win7搭建nginx+php+mysql开发环境以及websocket聊天实例测试
Win7搭建nginx+php+mysql开发环境以及websocket聊天实例测试一.下载相关安装包 1.下载nginx最新版本(nginx1.3.13版之后才支持websocket协议) 下载地址 ...
随机推荐
- C语言2
今天总结数组和数据类型,数组就是按一定顺序排列,具有某种相同性质的同类型变量的集合,这些变量具有相同的名字和数据类型(int char long 等),在内存中顺序排列,并通过下标区分(下标从0开始 ...
- 使用 JSONP 实现简单的 SSO 单点登录
SSO 即 Single Sign On(单点登录). 一.二级域名之间的单点登录 不需要用到JSONP 或者 p3p 协议,直接使用 COOKIE 就行了,因为顶级域名相同就能实现 COOKIE ...
- mysql快速导出数据库ER图和数据字典(附navicat11安装教程及资源)
♣ mysql使用navicat11快速导出数据库ER图 ♣ mysql使用navicat11快速导出数据库数据字典 ♣ navicat11 for mysql (这里是mysql5.7.12)专业版 ...
- ios调用百度地图定位遇到的奇葩问题
app项目过程中需要用到百度地图,然后网上可以查资料看官网文档,最后弄了好几天还是不行,找了各位前辈帮忙虽然解决了,但是把代码拷贝到我的项目时又无法定位了,最后查看了下原因是info配置出了问题,不是 ...
- pt-archiver使用
pt-archiver工具其实就是用来清理,归档数据用的 一.归档前的准备需要配置client字符集为utf-8,如果你用了utf-8的编码,防止归档数据为乱码[client]default-char ...
- 神奇的 CURL 命令
CURL? 嗯,说来话长了~~~~ 这东西现在已经是苹果机上内置的命令行工具之一了,可见其魅力之一斑 1) 二话不说,先从这里开始吧! curl http: //www.yahoo.com 回车之 ...
- PHP 用 mb_strimwidth() 截取文章摘要
按字符宽度获取 mb_strimwidth ( string $str , int $start , int $width [, string $trimmarker [, string $encod ...
- Sina 新浪Ip归属地Api 很好用的,使用get请求
前言 这几天做了一个客服管理系统,需要根据游客的Ip获取他的归属地,刚开始使用了,www.ip138.com 抓取ip归属地,用这还可以,但是不显示国家:于是是找了这个新浪的Api,很不错啊 用法 1 ...
- 通过href简单实现单击a链接跳转到页面指定位置
在页面中点击a标签后,要使其跳到页面里面相应的地方,方法很简单,就是在a标签里面href中的内容和你要跳到这个区域的id同名即可,例如: <a href="#ppp" tar ...
- linux 监测函数
http://www.ttlsa.com/linux/the-nethogs-view-each-process-uses-bandwidth/ Linux的IO性能监控工具iostat详解 http ...