您的位置:首页 > 其它

Redmine插件及使用

2015-06-05 09:37 585 查看

Plugins

Pluginlist

AfulllistofavailableRedminepluginscanbefoundatthePluginDirectory.

Moreplugins(someinveryearlydevelopment),whicharenotlistedatthePluginDirectorybutarepubliclyavailableonGitHub,canbefoundusingasearchlikethis.

Installingaplugin

1.Copyyourplugindirectoryinto
#{RAILS_ROOT}/plugins
(Redmine2.x)or
#{RAILS_ROOT}/vendor/plugins
(Redmine1.x).IfyouaredownloadingtheplugindirectlyfromGitHub,youcandosobychangingintoyourplugindirectoryandissuingacommandlike
gitclonegit://github.com/user_name/name_of_the_plugin.git
.

2.Ifthepluginrequiresamigration,runthefollowingcommandin
#{RAILS_ROOT}
toupgradeyourdatabase(makeadbbackupbefore).

2.1.ForRedmine1.x:

rakedb:migrate_pluginsRAILS_ENV=production

2.2.ForRedmine2.x:

rakeredmine:plugins:migrateRAILS_ENV=production

3.RestartRedmine

YoushouldnowbeabletoseethepluginlistinAdministration->Pluginsandconfigurethenewlyinstalledplugin(ifthepluginrequirestobeconfigured).



Uninstallingaplugin

1.Ifthepluginrequiredamigration,runthefollowingcommandtodowngradeyourdatabase(makeadbbackupbefore):

1.1.ForRedmine1.x:

rakedb:migrate:pluginNAME=plugin_nameVERSION=0RAILS_ENV=production

1.2.ForRedmine2.x:

rakeredmine:plugins:migrateNAME=plugin_nameVERSION=0RAILS_ENV=production

1.3ForRedmine3.x

Redmine提供了比较丰富的插件,介绍几个插件的安装。RM.2.3是目前最新版本,使用的是bitnamiredmine一键安装
下载zip包,解压文件夹名为:redmine_backlogs
放到

redmine-3.0.3-0\apps\redmine\htdocs\plugins\文件夹下

cmd到redmine-3.0.3-0目录,运行use_redmine命令

弹出新的cmd,跳转到redmine-3.0.3-0\apps\redmine\htdocs

运行下面命令:

D:\Bitnami\redmine-3.0.3-0\apps\redmine\htdocs>bundleexecrakeredmine:plugins:
migrateRAILS_ENV=production



D:\Bitnami\redmine-3.0.3-0\apps\redmine\htdocs>bundleexecrakeredmine:pluginsRAILS_ENV=production--trace

转到管理-插件(redminebacklogs)-配置,进行配置
重启服务即可

1.https://github.com/pharmazone/redmine_charts2下载压缩包

2.解压,放到plugins下面,改名redmine_charts2

3.https://github.com/pullmonkey/open_flash_chart下载压缩包

4.解压,放到plugins目录下面,改名为open_flash_chart

5.将open_flash_chart目录下的asserts目录拷贝到public\plugin_assets目录下,改名为open_flash_chart

6.cd到htdocs目录下,执行rakeredmine:pluginsRAILS_ENV=production命令

7.重启redmine,管理员登录后配置,即可使用

安装geminwindows:

1.下载gem.zip;

2.解压;

3.cd解压目录;

4.C:\Users\win7\Desktop\climate_control-0.0.3>gembuildclimate_control.gemspec

5.生成:climate_control-0.0.3.gem文件;

6.C:\Users\win7\Desktop\climate_control-0.0.3>geminstallclimate_control-0.0.3.gem

安装完成。

Linux:

安装插件:

cdredmine
./use_redmine
cd/apps\redmine\htdocs\plugins
gitclonehttps://github.com/scrum2b/scrum2b.gitbundleinstall
bundleexecrakeredmine:plugins:migrateRAILS_ENV=production
servicenginxrestart

重启\Redmine服务:

Tostart/stop/restartapplicationonLinuxyoucanusetheincluded
ctlscript.shutility,asshownbelow:
./ctlscript.sh(start|stop|restart)
./ctlscript.sh(start|stop|restart)mysql
./ctlscript.sh(start|stop|restart)apache
./ctlscript.sh(start|stop|restart)redmine
./ctlscript.sh(start|stop|restart)subversion

1、进入plugins目录:cdplugins

gitclonegit://github.com/backlogs/redmine_backlogs.git(git已经在前面安装railinstaller的过程中安装过了)


这会创建一个redmine_backlogs的目录
2、cdredmine_backlogs执行gittag命令查看各种可用的版本
3、选择最新的一个执行gitcheckoutv0.9.26
4、cdredmine根目录配置backlogs,执行命令:bundleexecrakeredmine:backlogs:install

2.Removeyourpluginfromthepluginsfolder:
#{RAILS_ROOT}/plugins
(Redmine2.x)or
#{RAILS_ROOT}/vendor/plugins
(Redmine1.x)..

3.RestartRedmine

Writingplugins

Thereisastep-by-steptutorialaboutwritingaplugin.Somemore(detailed)informationiscollectedandstoredinthe"plugininternals"page.
More(general)developerinformationcanbefoundintheRedmineDeveloperGuide.

MigratingPlugins

TherearechangesinPluginsAPIornewRailsrequirementswhichneedtobeconsideredifyouwanttousepluginfrompriorversionofredmine.
Inanycaseit'sproposedtoupdateandmigrateredminecoresystemfirstwithoutpluginsandthenifstabletrytodropinonebyone,toknowwhereproblemscomefromifany.

Considerationtowardspluginswhichoverwriteviewscompletlybecauseofbadcodingstyleorthereisno"hook"availableshallbemadeinanycase.Maybeyoucancollectandwritedownpluginreferencesherewhichareofthistype.

Let'sstartwith..

Redmine_blocks

Redmine1.3>1.4

routes.rbwhichdefinesurltocontroller(parameter,action)mappingmustbecreatedin<plugin>/config/routes.rb

ARCondition
isgonewithnoreplacement

TabularFormBuilder
isnow
Redmine::Views::LabelledFormBuilder


definingyourowncontextmenusnowrequires
helper:context_menus
intherespectivecontroller

ofcourse,
returning
isdeprecatedinfavorof
tap


ifyou'redoinganythingwithreposcheckittwice,becausetherecanbemultiplereposnowperproject

Project#visible_by
isdeprecatedandreplacedby
Project#visible_condition


Redmine1.4>2.x

WritingpluginscompatiblewithbothRedmine1.xand2.x-sometips

WritingRedmine2.xplugins

Tutorial
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: