未定义的方法“突出显示” Python+Pygments

发布于 2024-12-14 16:42:31 字数 1286 浏览 1 评论 0原文

我在 RHEL 6 i386 上使用 python 2.6.6Pygments version 1.4,但当我尝试在 gitlabhq 中创建新项目时总是收到此错误消息。

gem 列表显示:pygments.rb (0.2.3)rubypython (0.5.1) 等。

运行 rails s -e production 后,我在 stdout 中看到以下错误。 这个错误首先发生:

Completed 500 Internal Server Error in 595ms

ActionView::Template::Error (Could not open library 'lib.so': lib.so: cannot open shared     object file: No such file or directory):
1: <% bash_lexer = Pygments::Lexer[:bash] %>
2: <div class="">
3:   <div class="git-empty">
4:     <h2>Git global setup:</h2>
app/views/projects/empty.html.erb:1:in   
`_app_views_projects_empty_html_erb___391147148_103534650'
app/controllers/projects_controller.rb:66:in `show'

然后我看到这个:

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'

I am using python 2.6.6 and Pygments version 1.4 on RHEL 6 i386 but always get this error message when I try to create a new project in gitlabhq.

gem list reveals: pygments.rb (0.2.3), rubypython (0.5.1) among others.

After running rails s -e production I see the following error in stdout.
This error happens first:

Completed 500 Internal Server Error in 595ms

ActionView::Template::Error (Could not open library 'lib.so': lib.so: cannot open shared     object file: No such file or directory):
1: <% bash_lexer = Pygments::Lexer[:bash] %>
2: <div class="">
3:   <div class="git-empty">
4:     <h2>Git global setup:</h2>
app/views/projects/empty.html.erb:1:in   
`_app_views_projects_empty_html_erb___391147148_103534650'
app/controllers/projects_controller.rb:66:in `show'

then I see this:

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'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苏大泽ㄣ 2024-12-21 16:42:40

链接器错误,修复:yum install python-devel

linker error, fix: yum install python-devel

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文