undefined method `highlight' #83

Closed
dtolj opened this Issue Nov 9, 2011 · 9 comments

Comments

Projects
None yet
4 participants

dtolj commented Nov 9, 2011

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'
Contributor

vsizov commented Nov 9, 2011

enter in command line
#pygmentize
what you see?

dtolj commented Nov 9, 2011

@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>.
Contributor

vsizov commented Nov 9, 2011

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

Contributor

sairam commented Nov 10, 2011

Try installing the latest version of the pygments gem . It will solve the
problem.

On Wed, Nov 9, 2011 at 11:01 PM, Dejan Tolj <
reply@reply.github.com>wrote:

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'

Reply to this email directly or view it on GitHub:
#83

dtolj commented Nov 10, 2011

@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 commented Nov 10, 2011

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

Contributor

akzhan commented Nov 10, 2011

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.

Contributor

akzhan commented Nov 10, 2011

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

dtolj commented Nov 10, 2011

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

@dtolj dtolj closed this Nov 10, 2011

vsizov added a commit that referenced this issue Nov 10, 2011

akzhan pushed a commit to akzhan/gitlabhq that referenced this issue May 18, 2012

Rovanion pushed a commit to Rovanion/gitlabhq that referenced this issue Nov 15, 2013

Merge pull request #83 from sagikazarmark/patch-1
Update init script status from Unicorn to Puma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment