sroegner/codebook

500 error when trying access administration

Closed this issue · 13 comments

I get following error in the production log when I try to access codebook administration:

Parameters: {"action"=>"admin", "controller"=>"codebook"}
Rendering template within layouts/base
Rendering codebook/admin

ActionView::TemplateError (uninitialized constant CodeRay::FileType) on line #24 of vendor/plugins/codebook/app/views/codebook/admin.html.erb:
21: <%= l(:codebook_table_header_lang) %><%= l(:codebook_table_header_actions) %>
22:
23:
24: <%- renderable = supported_languages() -%>
25: <%= render :partial => 'code_language', :collection => @languages, :locals => { :supported => renderable } %>
26:
27:

What is your redmine version?

Latest stable release: 0.9.5 (2010-06-28)

*** LOCAL GEMS ***

actionmailer (2.3.8, 2.3.5)
actionpack (2.3.8, 2.3.5)
activerecord (2.3.8, 2.3.5)
activeresource (2.3.8, 2.3.5)
activesupport (2.3.8, 2.3.5)
cgi_multipart_eof_fix (2.5.0)
coderay (0.9.2)
daemons (1.1.0)
fastthread (1.0.7)
gem_plugin (0.2.3)
googlecharts (1.6.0)
holidays (0.9.3)
jruby-openssl (0.7)
mongrel (1.1.5)
mongrel_cluster (1.0.5)
mysql (2.8.1)
passenger (2.2.15)
rack (1.1.0, 1.0.1)
rails (2.3.5)
rake (0.8.7)
rubygems-update (1.3.7)

I don't have anything for you right away but you could try the "pulled" branch of codebook which does have the changes to support the new CodeRay version.

But then I just installed a 0.9.5 from the release tar and it worked on the codebook master branch. Looks like we need to dig a little deeper. Can you also provide a listing of your vendor/plugins directory?

Any way you remove your locally installed coderay (the 0.9.2) version there and try again? That could also fix it.

I have also tried to remove and install coderay 0.9.2 did not help.. first I had version 0.9.5 installed then I downgraded :)

Here my plugins listing:

drwxr-xr-x 4 4096 Jun 28 12:07 acts_as_activity_provider/
drwxr-xr-x 4 4096 Jun 28 12:07 acts_as_attachable/
drwxr-xr-x 4 4096 Jun 28 12:07 acts_as_customizable/
drwxr-xr-x 4 4096 Jun 28 12:07 acts_as_event/
drwxr-xr-x 5 4096 Jun 28 12:07 acts_as_list/
drwxr-xr-x 4 4096 Jun 28 12:07 acts_as_searchable/
drwxr-xr-x 5 4096 Jun 28 12:07 acts_as_tree/
drwxr-xr-x 5 4096 Jun 28 12:07 acts_as_versioned/
drwxr-xr-x 4 4096 Jun 28 12:07 acts_as_watchable/
drwxr-xr-x 6 4096 Jul 1 08:50 attachment_fu/
drwxr-xr-x 6 4096 Jun 28 12:07 awesome_nested_set/
drwxr-xr-x 5 4096 Jun 28 12:07 classic_pagination/
drwxr-xr-x 9 4096 Jul 1 08:52 codebook/
drwxr-xr-x 4 4096 Jun 28 12:07 coderay-0.9.2/
drwxr-xr-x 6 4096 Jun 28 15:21 embedded/
drwxr-xr-x 7 4096 Jun 28 12:07 engines/
drwxr-xr-x 7 4096 Jun 28 15:31 ezfaq_plugin/
drwxr-xr-x 5 4096 Jun 28 12:07 gravatar/
drwxr-xr-x 5 4096 Jun 28 15:47 issue_due_date/
drwxr-xr-x 7 4096 Jun 28 12:07 open_id_authentication/
drwxr-xr-x 3 4096 Jun 28 12:07 prepend_engine_views/
drwxr-xr-x 8 4096 Jun 28 15:39 question_plugin/
drwxr-xr-x 8 4096 Jun 28 15:42 redmine_graphs/
drwxr-xr-x 9 4096 Jun 28 16:05 redmine_schedules/
drwxr-xr-x 10 4096 Jul 1 08:50 redmine_sprints/
drwxr-xr-x 8 4096 Jun 28 15:59 redmine_wiki_extensions/
drwxr-xr-x 5 4096 Jun 28 12:07 rfpdf/
drwxr-xr-x 5 4096 Jun 28 12:07 ruby-net-ldap-0.0.4/

I will try the pulled branch now.. let you know details...

I installed the pulled version with coderay 0.9.3 and it works fine now... :) perhaps the coderay version i had made troubles... how knows ;) thx for your support!

Ok, there we seem to have it. Any particular reason you need the newer coderay? (Am just curious) .Current Redmine still comes with coderay-0.7.6.227, which works with the codebook master. Which also means that the branch should help you.

no reason why I use newer coderay... It just instaled that one when I did setup ruby ;)

i'm having the same problem:

ActionView::TemplateError (uninitialized constant CodeRay::FileType) on line #27 of vendor/plugins/codebook/app/views/code_documents/show.html.erb:

My coderay version is 0.9.3:

*** LOCAL GEMS ***

actionmailer (2.3.5, 2.3.4)
actionpack (2.3.5, 2.3.4)
activerecord (2.3.5, 2.3.4)
activeresource (2.3.5, 2.3.4)
activesupport (2.3.5, 2.3.4)
coderay (0.9.3)
daemons (1.0.10)
eventmachine (0.12.10, 0.12.8)
fastthread (1.0.7)
mattetti-googlecharts (1.4.0)
mysql (2.8.1)
passenger (2.2.9, 2.2.5)
rack (1.1.0, 1.0.1, 1.0.0)
rails (2.3.5, 2.3.4)
rake (0.8.7)
rmagick (2.12.2)
thin (1.2.5, 1.2.4)

Any idea how to solve this?

thanks!

strange thing: when i restart redmine, and go directly to a code snippet, i get that error. When viewing a sourcefile from the repository first, and then view a code snippet, it works...

Don't bother with looking - the version in the master branch expects an older coderay version. I will try to make that work without breaking older versions. As a quick fix, you can try going into the codebook directory (cd vendor/plugins/codebook) and do a 'git checkout pulled' to get the branch that should work with your version of coderay.

hth
Steffen

thanks, that worked. i didn't read the thread properly, sorry ...