ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Git repository fetch does not work with Ruby 1.9.2 (Bug #814)


Added by Mak Babu at 2012-01-03 11:11 am. Updated at 2012-01-03 12:58 pm.


Status:Needs more information Start date:2012-01-03
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Remote issue URL: Affected version:

Description

Git repository is configured properly. When we click on "Repository" link, the trace below is displayed and the web app crashes. Since, app is running 2.5.0 version and ruby 1.9.2 to confirm the issues is with Ruby 1.9.2, have downgraded ruby to 1.8.7 and repeated the same steps and the page is getting displayed properly.

The trace from log is below

Shelling out: 'git' '--git-dir' '/var/www/git.happiestminds.com/gitrepo/blah' '-c' 'core.quotepath=false' 'ls-tree' '-l' 'master:'

ArgumentError (unknown encoding name - ):
lib/redmine/scm/adapters/git_adapter.rb:122:in `force_encoding'
lib/redmine/scm/adapters/git_adapter.rb:122:in `block (2 levels) in entries'
lib/redmine/scm/adapters/git_adapter.rb:114:in `each_line'
lib/redmine/scm/adapters/git_adapter.rb:114:in `block in entries'
lib/redmine/scm/adapters/abstract_adapter.rb:208:in `call'
lib/redmine/scm/adapters/abstract_adapter.rb:208:in `block in shellout'
lib/redmine/scm/adapters/abstract_adapter.rb:206:in `popen'
lib/redmine/scm/adapters/abstract_adapter.rb:206:in `shellout'
lib/redmine/scm/adapters/abstract_adapter.rb:187:in `shellout'
lib/redmine/scm/adapters/git_adapter.rb:349:in `scm_cmd'
lib/redmine/scm/adapters/git_adapter.rb:113:in `entries'
app/models/repository.rb:84:in `entries'
app/controllers/repositories_controller.rb:76:in `show'
<internal:prelude>:10:in `synchronize'
passenger (3.0.11) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'


Associated revisions

Revision 07882590
Added by Jean-Philippe Lang at 2008-03-08 02:46 pm

Strip out email address from authors in repository screens (#814).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1208 e93f8b46-1217-0410-a6f0-8f06a7374b81

History

Updated by Holger Just at 2012-01-03 11:49 am

Ruby 1.8.7 doesn't care about the encoding and just handles byte streams. Thus, we generally assume UTF-8 data. Ruby 1.9 uses real Strings with an encoding attached, so these things suddenly become important.

In this case, you need to configure the Repository encoding in Administration -> Settings -> Repositories to match the encoding in your repository (e.g. UTF-8). Please check again if this solves your issue.

  • Status changed from Open to Needs more information

Updated by Mak Babu at 2012-01-03 11:55 am

Configured the encoding for UTF8 as suggested by you. However the same issue is still occurring. Still researching the flow to figure out why it is not picking up the settings.

On hindsight, shouldn't we have a default encoding!

Updated by Mak Babu at 2012-01-03 12:58 pm

While creating a git repo, from project settings, it is mentioned that UTF-8 is default. However this is not used in the code. Setting the encoding manually fixes the issue.

Shall work on a patch to fix it at code level.

Also available in: Atom PDF