Error 500 on commit view
Closed
Error 500 on commit view
Created by: ufna
From logfile:
ActionView::Template::Error (invalid byte sequence in UTF-8):
3: - lines_arr = diff.diff.lines.to_a
4: - lines_arr.each do |line|
5: - line.force_encoding(Encoding::UTF_8)
6: - next if line.match(/^--- /dev/null/)
7: - next if line.match(/^--- a/)
8: - next if line.match(/^+++ b/)
9: - if line.match(/^@@ -/)
app/views/commits/_text_file.html.haml:6:in match' app/views/commits/_text_file.html.haml:6:in
match'
app/views/commits/_text_file.html.haml:6:in block in _app_views_commits__text_file_html_haml___547701424848961860_43537420' app/views/commits/_text_file.html.haml:4:in
each'
app/views/commits/_text_file.html.haml:4:in _app_views_commits__text_file_html_haml___547701424848961860_43537420' app/views/commits/_diff.html.haml:18:in
block in _app_views_commits__diff_html_haml___2514220832362293068_51073320'
app/views/commits/_diff.html.haml:4:in each' app/views/commits/_diff.html.haml:4:in
_app_views_commits__diff_html_haml___2514220832362293068_51073320'
app/views/commits/show.html.haml:29:in _app_views_commits_show_html_haml__478605241471832011_55794280' app/controllers/commits_controller.rb:30:in
show'
Created by: ufna
Can't reopen this issue, but it still have a place, but today is:
ActionView::Template::Error (incompatible character encodings: macCyrillic and Windows-1251): 12: - next 13: 14: = diff_line(line, line_new, line_old) 15: - if line[0] == "+" 16: - line_new += 1 17: - elsif line[0] == "-" 18: - line_old += 1 app/views/commits/_text_file.html.haml:15:in
block in _app_views_commits__text_file_html_haml__2492793654408182209_46182480' app/views/commits/_text_file.html.haml:4:in
each' app/views/commits/_text_file.html.haml:4:in_app_views_commits__text_file_html_haml__2492793654408182209_46182480' app/views/commits/_diff.html.haml:18:in
block in _app_views_commits__diff_html_haml___4471571445958805925_47163340' app/views/commits/_diff.html.haml:4:ineach' app/views/commits/_diff.html.haml:4:in
_app_views_commits__diff_html_haml___4471571445958805925_47163340' app/views/commits/show.html.haml:29:in_app_views_commits_show_html_haml__494101970373471082_47409380' app/controllers/commits_controller.rb:30:in
show'By Administrator on 2011-11-28T20:42:17 (imported from GitLab project)
Created by: hackruu
+1 Latest from master branch. ActionView::Template::Error (incompatible character encodings: macCyrillic and Windows-1251): ActionView::Template::Error (incompatible character encodings: ISO-8859-2 and TIS-620):
By Administrator on 2011-11-28T20:55:27 (imported from GitLab project)
Created by: SaitoWu
@ufna same place? but different error?
maybe i just fixed : incompatible character encodings: xxencodexx and utf-8.
i think its a chardetect issue. maybe rchardet19 didn't know macCyrillic.
can u give me some files or tinyrepo.. then i can reproduce it?
thx.
By Administrator on 2011-11-29T05:59:19 (imported from GitLab project)
Created by: ufna
@SaitoWu yes, same place.
I've created new repository and push this file: http://dl.dropbox.com/u/15490650/Work/Other/installnotes.txt . It contains text in Russian inside. So, pull is successfull, but it gains 500 error when I try to view it in gitlab.
By Administrator on 2011-11-29T06:07:14 (imported from GitLab project)
Created by: hackruu
ActionView::Template::Error (Could not find table 'merge_requests'): 44: - if @project.merge_requests.opened.count > 0 45: %span{ :class => "number" }= @project.merge_requests.opened.count 46: = link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do 47: Snippets 48: - if @project.snippets.non_expired.count > 0 49: %span{ :class => "number" }= @project.snippets.non_expired.count 50: app/views/layouts/project.html.haml:47:in
block in _app_views_layouts_project_html_haml__2642575161051610051_57517380' app/views/layouts/project.html.haml:46:in
_app_views_layouts_project_html_haml__2642575161051610051_57517380' app/controllers/commits_controller.rb:30:in `show'lastest master, made db:migrate.
By Administrator on 2011-11-30T10:26:38 (imported from GitLab project)
Created by: hackruu
changes in commit view looks strange: http://pix.am/ACNO/ it should be:
By Administrator on 2011-11-30T10:54:34 (imported from GitLab project)
Created by: SaitoWu
@hackruu encode fail on some text...
the treeview file looks ok and the diffview got this problem?
it may a char detect issue or encode issue by ruby..
i will find the best way to solve this ..
character encoding is very complex.. :/
By Administrator on 2011-11-30T11:05:45 (imported from GitLab project)
Created by: hackruu
Hello!
It's better now! But capital letters still broken:( http://pix.am/rUh6/
By Administrator on 2011-12-01T11:35:49 (imported from GitLab project)
Created by: SaitoWu
@hackruu i caught this bug..
because char detect is fail. i use
rchardet19
to detect the code's encoding, then convert the code's encoding to utf-8.ur whole file detect is right. it's encoding. so, in the tree view. ur code looks great..
but, in ur case..
1.9.3p0 :009 > diff.diff => "--- a/mtg_novels.html\n+++ b/mtg_novels.html\n@@ -19,7 +19,7 @@\n <TR>\n <!-- \xCC\xE5\xED\xFE -->\n <TD BGCOLOR=#000000 WIDTH=140 VALIGN=\"TOP\">\n-<?php include 'menu.inc'; ?>\n+<?php include= 'menu.inc'; ?>\n </TD>\n <noindex>\n <!-- \xCE\xF1\xED\xEE\xE2\xED\xEE\xE9 \xF2\xE5\xEA\xF1\xF2 -->" 1.9.3p0 :010 > CharDet.detect(diff.diff) => #<struct encoding="MacCyrillic", confidence=0.9034937924254334>
it's detect to MacCyrillic.. not Cyrillic or windows-1251. so . the first letter is broken..
so, we must find a better detect lib.. any suggestions?
By Administrator on 2011-12-02T03:21:31 (imported from GitLab project)