Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

undefined method `highlight' #83

Closed
dtolj opened this Issue · 9 comments

4 participants

@dtolj

After creating a new project, it shows an error 500. Project was created but whenever I navigate to its page, I get 500 error.

I am using python 2.6.6 on RHEL 6 i386

Completed 500 Internal Server Error in 7ms

ActionView::Template::Error (undefined method `highlight' for nil:NilClass):
    7: git config --global user.email  "#{current_user.email}"
    8: eos
    9: %>
    10:     <%= raw bash_lexer.highlight(setup_str) %>
    11:     <br />
    12:     <br />
    13:     <h2>Next steps:</h2>
  app/views/projects/empty.html.erb:10:in `_app_views_projects_empty_html_erb___460979452__619384988'
  app/controllers/projects_controller.rb:66:in `show'
@vsizov
Collaborator

enter in command line
#pygmentize
what you see?

@dtolj

@vsizov

Usage: /usr/bin/pygmentize [-l <lexer> | -g] [-F <filter>[:<options>]] [-f <formatter>]
          [-O <options>] [-P <option=value>] [-o <outfile>] [<infile>]

       /usr/bin/pygmentize -S <style> -f <formatter> [-a <arg>] [-O <options>] [-P <option=value>]
       /usr/bin/pygmentize -L [<which> ...]
       /usr/bin/pygmentize -N <filename>
       /usr/bin/pygmentize -H <type> <name>
       /usr/bin/pygmentize -h | -V

Highlight the input file and write the result to <outfile>.
@vsizov
Collaborator

Unfortunately we not tried gitlabhq on RHEL.
You can use this manual http://zx-1986.blogspot.com/

@sairam
@dtolj

@vsizov Thats the guide I followed,
@sairam I have
Using rubypython (0.5.1)
Using pygments.rb (0.2.3)

I opened up a question on stackoverflow: http://stackoverflow.com/questions/8070065/undefined-method-highlight-pythonpygments

@dtolj

What is bash_lexer from the error message above? Does it refer to any program?

@akzhan

bash_lexer defined above in template in previous code block.

so error may be related to various erb implementations.

I suppose that bash_lexer should be replaced with its assignment right side expression.

@akzhan

Try to replace bash_lexer with Pygments::Lexer[:bash] in app/views/projects/empty.erb template.

@dtolj

The issue is related to tmm1/pygments.rb#10
FIX: yum install python-devel

@dtolj dtolj closed this
@iamntz iamntz referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@iamntz iamntz referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@vsizov vsizov referenced this issue from a commit
@vsizov vsizov Issue #83 - Project limit 8bb5e5b
@akzhan akzhan referenced this issue from a commit in akzhan/gitlabhq
@vsizov vsizov Issue #83 - Project limit 67f0c62
@krainboltgreene krainboltgreene referenced this issue from a commit
@vsizov vsizov Issue #83 - Project limit
Former-commit-id: 67f0c62
9f1917f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.