Server Error 500 in Wiki if lexer not found
Created by: Philzen
Just copied some example JSON into a gitlab wiki, preceding it by:
```Javascript
After saving it (which production.log
tells me went OK), trying to display the wiki entry is futile always giving error 500. The log traceback is as follows:
ActionView::Template::Error (Traceback (most recent call last):
File "/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/pygments.rb-0.3.1/lib/pygments/mentos.py", line 303, in start
res = self.get_data(method, lexer, args, kwargs, text)
File "/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/pygments.rb-0.3.1/lib/pygments/mentos.py", line 171, in get_data
res = self.highlight_text(text, lexer, formatter_name, args, _convert_keys(opts))
File "/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/pygments.rb-0.3.1/lib/pygments/mentos.py", line 122, in highlight_text
lexer = self.return_lexer(lexer, args, kwargs, code)
File "/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/pygments.rb-0.3.1/lib/pygments/mentos.py", line 79, in return_lexer
return lexers.get_lexer_by_name(lexer, **inputs)
File "/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/pygments.rb-0.3.1/vendor/pygments-main/pygments/lexers/__init__.py", line 80, in get_lexer_by_name
raise ClassNotFound('no lexer for alias %r found' % _alias)
ClassNotFound: no lexer for alias 'Javascript' found
):
13: .file_holder
14: .file_content.wiki
15: = preserve do
16: = markdown @wiki.content
17:
18: %p.time Last edited by #{@wiki.user.name}, #{time_ago_in_words @wiki.created_at} ago
19: - if can? current_user, :admin_wiki, @project
lib/redcarpet/render/gitlab_html.rb:14:in `block_code'
app/helpers/gitlab_markdown_helper.rb:44:in `render'
app/helpers/gitlab_markdown_helper.rb:44:in `markdown'
app/views/wikis/show.html.haml:16:in `block in _app_views_wikis_show_html_haml__2973566385151022826_36987160'
app/views/wikis/show.html.haml:15:in `_app_views_wikis_show_html_haml__2973566385151022826_36987160'
app/controllers/wikis_controller.rb:20:in `show'
Running gitlab 3.0.3 on a gentoo server. All Gems are up-to-date.