查看完整版本: Redmine - 用rails开发的项目管理系统

bob.yang 2007-7-8 12:21

Redmine - 用rails开发的项目管理系统

Redmine是一个用rails开发的项目管理系统。他的界面简洁,功能丰富。
它的主页是:[url]http://www.redmine.org/[/url]
在是一个demo网站:[url]http://demo.redmine.org/[/url]
他的主要功能有:
    * 可以支持多个项目的管理
    * 基于角色的灵活的权限管理
    * 灵活的“问题”跟踪系统
    * 有甘特图和日历
    * 新闻、文档和文件管理
    * Feeds(聚合) & 邮件通知
    * 一个项目一个wiki
    * 简单的时间跟踪功能
    * “问题”、项目和用户中有可定制字段
    * SVN 浏览器 and diff 视图
    * 多LDAP验证支持
    * 支持用户的“自注册”
    * 多语言支持
    * 多数据库支持

我们公司的项目管理就是使用的redmine,然后在其上根据公司的具体需求进行了额外的开发。

admin 2007-7-13 18:57

可以用于开源项目平台管理么?

admin 2007-7-13 22:21

正在试用,看上去不错,但是没办法使用svn?

bob.yang 2007-7-16 09:29

回复 #3 skyover 的帖子

具体的问题是什么呢?我们一起想办法解决一下。

admin 2007-7-16 09:46

[quote]原帖由 [i]bob.yang[/i] 于 2007-7-16 09:29 发表 [url=http://ruby-lang.org.cn/forums/redirect.php?goto=findpost&pid=1167&ptid=287][img]http://ruby-lang.org.cn/forums/images/common/back.gif[/img][/url]
具体的问题是什么呢?我们一起想办法解决一下。 [/quote]

这是RedMine的地址:[url]http://dev.ruby-lang.org.cn/[/url]
这是SVN的地址: [url]http://svn.ruby-lang.org.cn/rgb[/url]

错误为,当试图访问SVN时,报错。
例如地址:[url]http://dev.ruby-lang.org.cn/repositories/show/1[/url]
报错:
[quote]
Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your redMine administrator for assistance.
[/quote]

我确信SVN地址已经设置正确啊。

你可以进配置里看看:用户名和密码均为admin

bob.yang 2007-7-18 14:24

回复 #5 skyover 的帖子

redmine的Svn实现是通过执行shell命令的方式来调用svn命令行程序的。所以你需要确保svn在你的PATH路径上。
如果你用development mode的redmine浏览svn功能页面时,你会看到类似下面的提示:
svn list --xml  "https://10.96.100.8/svn/myproject/"@HEAD --username bob.yang --password xxx

你可以在命令行执行一下,确保这个命令能正常执行,那么基本上redmine的svn浏览功能就可以用了。

另外,你可以把log中的错误内容贴出来看看是什么原因。

我已经把你上面的svn加到我本地的一个实验用redmine项目中,可以正常使用svn浏览功能。见附件的截图。

[[i] 本帖最后由 bob.yang 于 2007-7-18 14:36 编辑 [/i]]

admin 2007-7-18 18:20

感谢回复。

我在服务器本地试过执行svn ls命令是可以正常工作的。
而且在服务器上用WebBrick方式启动服务器也可以正常工作,奇怪了。

下面是Production.log里的部分内容:

[quote]
Processing RepositoriesController#show (for 218.6.2.169 at 2007-07-18 18:18:09) [GET]
  Session ID: 6a42682bfacfb39718157b8bb5b0e742
  Parameters: {"action"=>"show", "id"=>"1", "controller"=>"repositories"}


SvnRepos::CommandFailed (SvnRepos::CommandFailed):
    /app/models/svn_repos.rb:104:in `entries'
    /app/controllers/repositories_controller.rb:29:in `show'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'
    C:/AppServ/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:168:in `process_request'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:143:in `process_each_request!'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:109:in `with_signal_handler'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:142:in `process_each_request!'
    C:/AppServ/ruby/lib/ruby/site_ruby/1.8/fcgi.rb:598:in `each_cgi'
    C:/AppServ/ruby/lib/ruby/site_ruby/1.8/fcgi.rb:595:in `each'
    C:/AppServ/ruby/lib/ruby/site_ruby/1.8/fcgi.rb:595:in `each_cgi'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:141:in `process_each_request!'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:55:in `process!'
    C:/AppServ/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:25:in `process!'
    D:/sites/dev.ruby-lang.org.cn/public/dispatch.fcgi:25
[/quote]

我看了下源文件,代码为:
[code]
   # Returns an Entries collection
    # or nil if the given path doesn't exist in the repository
    def entries(path=nil, identifier=nil)
      path ||= ''
      identifier = 'HEAD' unless identifier and identifier > 0
      entries = Entries.new
      cmd = "svn list --xml #{target(path)}@#{identifier}"
      cmd << " --username #{@login} --password #{@password}" if @login
      shellout(cmd) do |io|
        begin
          doc = REXML::Document.new(io)
          doc.elements.each("lists/list/entry") do |entry|
            entries << Entry.new({:name => entry.elements['name'].text,
                        :path => ((path.empty? ? "" : "#{path}/") + entry.elements['name'].text),
                        :kind => entry.attributes['kind'],
                        :size => (entry.elements['size'] and entry.elements['size'].text).to_i,
                        :lastrev => Revision.new({
                          :identifier => entry.elements['commit'].attributes['revision'],
                          :time => Time.parse(entry.elements['commit'].elements['date'].text),
                          :author => (entry.elements['commit'].elements['author'] ? entry.elements['commit'].elements['author'].text : "")
                          })
                        })
          end
        rescue
        end
      end
      return nil if $? && $?.exitstatus != 0
      entries.sort_by_name
    rescue Errno::ENOENT => e
      raise CommandFailed
    end
[/code]

也只是shell了一个命令而已,但是为什么我直接在cmd下可以执行,在服务器本地也可以执行,但发布成网站就不行了呢。

admin 2007-7-18 18:29

难道是权限的原因?Apache是以System的运行的,Ruby.exe也是System权限啊。

bob.yang 2007-7-19 09:47

回复 #8 skyover 的帖子

会不会是你启动webric的环境下没有把svn命令放入path中?
你可以用console方式执行一下测试命令,如下:
[code]
ruby script/console
svn = SvnRepos::Base.new('http://svn.ruby-lang.org.cn/rgb')
=> #<SvnRepos::Base:0xb7032098 @root_url="http://svn.ruby-lang.org.cn/rgb", @url="http://svn.ruby-lang.org.cn/rgb">
>> svn.entries
=> [#<SvnRepos::Entry:0xb6ff63b8 @path="branches", @lastrev=#<SvnRepos::Revision:0xb6ff6390 @identifier="6", @paths=nil, @author="skyover", @message="", @time=Sat Jul 14 15:17:07 UTC 2007>, @kind="dir", @size=0, @name="branches">, #<SvnRepos::Entry:0xb6feb530 @path="tags", @lastrev=#<SvnRepos::Revision:0xb6feb508 @identifier="2", @paths=nil, @author="skyover", @message="", @time=Fri Jul 13 07:42:28 UTC 2007>, @kind="dir", @size=0, @name="tags">, #<SvnRepos::Entry:0xb6fe06a8 @path="trunk", @lastrev=#<SvnRepos::Revision:0xb6fe0680 @identifier="2", @paths=nil, @author="skyover", @message="", @time=Fri Jul 13 07:42:28 UTC 2007>, @kind="dir", @size=0, @name="trunk">]
>> `svn`
请使用“svn help”以得到用法。
=> ""
[/code]

admin 2007-7-19 14:31

我在Webrick下运行respositry那个页面没有问题。在Apache+FCGI下才有这个问题出来。

我在Console方式下运行你如上的命令,也没有问题。很正常。

我想问题一定出在Apache上。

admin 2007-7-19 18:15

我知道是什么原因了。在WebRick下的ENV的环境变量和在Apache下的环境变量不一样。

[code]
  def env
    render :text => ENV.to_a.join('<br />')
  end
[/code]

在WebRick下的结果:
[quote]ALLUSERSPROFILE
C:\Documents and Settings\All Users
APPDATA
C:\Documents and Settings\skyover\Application Data
APR_ICONV_PATH
C:\Program Files\Subversion\iconv
CLIENTNAME
LIMITLES-EDF350
ClusterLog
C:\WINDOWS\Cluster\cluster.log
CommonProgramFiles
C:\Program Files\Common Files
COMPUTERNAME
YDXZ-8D1158A16
ComSpec
C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK
NO
HOMEDRIVE
C:
HOMEPATH
\Documents and Settings\skyover
lib
C:\Program Files\SQLXML 4.0\bin\
LOGONSERVER
\\YDXZ-8D1158A16
NUMBER_OF_PROCESSORS
2
OS
Windows_NT
Path
c:\AppServ\MySQL5\bin;C:\AppServ\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\Subversion\bin
PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.py;.pyw;.RB;.RBW
PROCESSOR_ARCHITECTURE
x86
PROCESSOR_IDENTIFIER
x86 Family 15 Model 6 Stepping 5, GenuineIntel
PROCESSOR_LEVEL
15
PROCESSOR_REVISION
0605
ProgramFiles
C:\Program Files
PROMPT
$P$G
RAILS_ENV
development
SESSIONNAME
RDP-Tcp#2
SystemDrive
C:
SystemRoot
C:\WINDOWS
TEMP
C:\DOCUME~1\skyover\LOCALS~1\Temp\1
TMP
C:\DOCUME~1\skyover\LOCALS~1\Temp\1
USERDOMAIN
YDXZ-8D1158A16
USERNAME
skyover
USERPROFILE
C:\Documents and Settings\skyover
windir
C:\WINDOWS
[/quote]

在Apache下执行的结果:
[quote]
SystemRoot
C:\WINDOWS
RAILS_ENV
production
_FCGI_SHUTDOWN_EVENT_
1668
_FCGI_MUTEX_
1780
[/quote]

差太多了。现在的解决办法就是怎么样将环境变量加入到Apache里。

admin 2007-7-19 18:33

好啦,终于搞定啦。

[code]
  FastCgiServer "D:/sites/dev.ruby-lang.org.cn/public/dispatch.fcgi" -initial-env RAILS_ENV=production -

processes 3 -idle-timeout 120 -initial-env Path
[/code]

不过这应该不是最终的解决办法,总不可能每个环境变量都要我这样来设置一下吧。

感谢bob.yang的大力帮助。

admin 2007-7-19 18:33

好啦,终于搞定啦。

[code]
  FastCgiServer "D:/sites/dev.ruby-lang.org.cn/public/dispatch.fcgi" -initial-env RAILS_ENV=production -

processes 3 -idle-timeout 120 -initial-env Path
[/code]

不过这应该不是最终的解决办法,总不可能每个环境变量都要我这样来设置一下吧。

感谢bob.yang的大力帮助。

admin 2007-7-19 18:37

看看效果:[url]http://dev.ruby-lang.org.cn/repositories/show/1[/url]

Cool哦。

admin 2007-7-19 18:40

对RedMine还不是太熟悉,bob.yang要多多指教哦。

bob.yang 2007-7-20 09:41

回复 #15 skyover 的帖子

太好了,共同学习:)
页: [1]
查看完整版本: Redmine - 用rails开发的项目管理系统