Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActionView::Template::Error (no suitable markdown gem found): #144

Closed
micah opened this issue Mar 13, 2014 · 15 comments
Closed

ActionView::Template::Error (no suitable markdown gem found): #144

micah opened this issue Mar 13, 2014 · 15 comments
Assignees
Labels

Comments

@micah
Copy link

micah commented Mar 13, 2014

I added a repository called 'shared-check_mk' and immediately after it was created, when it loaded the repository page, I got an internal server error, and the following in my log:

Started GET "/code/projects/shared-checkmk/repository" for 127.0.0.1 at 2014-03-13 23:05:52 +0000
Processing by RepositoriesController#show as HTML
  Parameters: {"id"=>"shared-checkmk"}
  Current user: micah (id=6)
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
2014-03-13 23:05:52 +0000 WARN [GitCache] Cache is disabled : ''
  Rendered plugins/redmine_git_hosting/app/views/repositories/show.html.erb within layouts/base (179.3ms)
Completed 500 Internal Server Error in 446ms

ActionView::Template::Error (no suitable markdown gem found):
    1: <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
    2: 
    3: <div class="contextual">
    4:   <%= render :partial => 'navigation' %>
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:158:in `call_hook'
  app/controllers/repositories_controller.rb:125:in `show'

tried with one called shared_checkmk.git and it works, shared-foo.git works, shared_check_mk.git works, just not the combination of shared-check_mk.git!

btw. I do have the git caching enabled, so I'm not sure why those log messages about Cache is disabled are there.

@n-rodriguez
Copy link
Contributor

btw. I do have the git caching enabled, so I'm not sure why those log messages about Cache is disabled are there.

Because repository_id is nil. This should not happen. I've wrapped this case specifically in the last commit.

By the way did you run bundle install --without development test postgres ?

@n-rodriguez n-rodriguez added bug and removed bug labels Mar 14, 2014
@n-rodriguez n-rodriguez self-assigned this Mar 14, 2014
@micah
Copy link
Author

micah commented Mar 14, 2014

Nicolas [email protected] writes:

btw. I do have the git caching enabled, so I'm not sure why those log messages about Cache is disabled are there.

Because repository_id is nil. This should not happen. I've wrapped this case specifically in the last commit.

I'll pull the latest and restart to see if it helps.

By the way did you run bundle install --without development test postgres ?

I did only 'bundle install', I am running mysql, not postgresql... i
just did it again:

# bundle install --without development test postgres
Using RedCloth (4.2.9)
Using asciidoctor (0.1.4)
Using builder (3.2.2)
Using charlock_holmes (0.6.9.4)
Using creole (0.5.0)
Using diff-lcs (1.2.5)
Using expression_parser (0.9.0)
Using github-markup (1.0.3)
Using mime-types (1.25.1)
Using posix-spawn (0.3.8)
Using gitlab-grit (2.6.4)
Using gratr19 (0.4.4.1)
Using jbox-gitolite (1.1.9)
Using lockfile (2.1.3)
Using rubypants (0.2.0)
Using org-ruby (0.9.1)
Using rinku (1.7.3)
Using wikicloth (0.8.1)
Using bundler (1.1.4)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

@micah
Copy link
Author

micah commented Mar 14, 2014

micah [email protected] writes:

Nicolas [email protected] writes:

btw. I do have the git caching enabled, so I'm not sure why those log messages about Cache is disabled are there.

Because repository_id is nil. This should not happen. I've wrapped this case specifically in the last commit.

I'll pull the latest and restart to see if it helps.

after pulling the new code and restarting, i'm not seeing that error any
longer, and instead am getting the git setup page for the repo.

@n-rodriguez
Copy link
Contributor

You should run bundle install... in Redmine root dir.

@micah
Copy link
Author

micah commented Mar 14, 2014

Nicolas [email protected] writes:

You should run bundle install... in Redmine root dir.

If I do that, I get this:

Could not locate Gemfile

@n-rodriguez
Copy link
Contributor

So there is a problem in your Redmine install.

@micah
Copy link
Author

micah commented Mar 14, 2014

This is a common debian redmine installation, it perhaps puts things in different locations.

@n-rodriguez
Copy link
Contributor

apt-get install ruby-redcarpet

@micah
Copy link
Author

micah commented Mar 15, 2014

thanks! that helped! I think you are right that this isn't a plugin issue at all, but a redmine one (and a debian specific one). I've filed a bug with the debian package to have that resolved.

@alexandermeindl
Copy link
Collaborator

I have the same problem with Redmine 2.4.5, Ruby version: 1.9.3-p545 (2014-02-24) x86_64-linux, Rails version: 3.2.17, redmine_git_hosting: 0.7.1

yes, I run bundler install .... without errors.

Here is a list with my installed gems:

actionmailer (3.2.17)
actionpack (3.2.17)
activemodel (3.2.17)
activerecord (3.2.17)
activeresource (3.2.17)
activesupport (3.2.17)
acts-as-taggable-on (2.3.3)
arel (3.0.3)
asciidoctor (0.1.4)
best_in_place (2.1.0)
builder (3.0.0)
bundler (1.6.2)
charlock_holmes (0.6.9.4)
coderay (1.1.0)
creole (0.5.0)
diff-lcs (1.2.5)
erubis (2.7.0)
expression_parser (0.9.0)
github-markup (1.1.1)
gitlab-grit (2.6.5)
gratr19 (0.4.4.1)
hike (1.2.3)
i18n (0.6.9)
jbox-gitolite (1.1.11)
journey (1.0.4)
jquery-rails (2.0.3)
json (1.8.1)
kgio (2.9.2)
liquid (2.4.1)
lockfile (2.1.3)
mail (2.5.4)
mime-types (1.25.1)
money (5.1.1)
multi_json (1.9.2)
mysql2 (0.3.15, 0.3.14)
net-ldap (0.3.1)
org-ruby (0.9.3)
pdf-core (0.2.5)
polyglot (0.3.4)
posix-spawn (0.3.8)
prawn (1.0.0)
rack (1.4.5)
rack-cache (1.2)
rack-openid (1.4.2, 1.4.1)
rack-ssl (1.3.4)
rack-test (0.6.2)
rails (3.2.17)
railties (3.2.17)
raindrops (0.13.0)
rake (10.1.1)
rdoc (3.12.2)
RedCloth (4.2.9)
redmine_acts_as_taggable_on (1.0.0)
rinku (1.7.3)
rmagick (2.13.2)
ruby-ole (1.2.11.7)
ruby-openid (2.3.0)
rubypants (0.2.0)
spreadsheet (0.6.9)
sprockets (2.2.2)
thor (0.19.1)
tilt (1.4.1)
treetop (1.4.15)
ttfunk (1.1.1)
tzinfo (0.3.39)
unicorn (4.8.2)
vcard (0.2.12)
wicked_pdf (0.10.0, 0.9.10)
wikicloth (0.8.1)
wkhtmltopdf-binary (0.9.9.1)
ya2yaml (0.31)

Do you have any ideas, what is the problem?

Here is my error log entry:

ActionView::Template::Error (no suitable markdown gem found):
    47:                        :id => @project, :page => nil, :key => User.current.rss_key})) %>
    48:    <% end %>
    49: 
    50:    <%= call_hook(:view_repositories_show_bottom, { :repository => @repository, :project => @project }) %>
    51: 
    52:    <% other_formats_links do |f| %>
    53:     <%= f.link_to 'Atom',
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:158:in `call_hook'
  app/controllers/repositories_controller.rb:125:in `show'

@n-rodriguez
Copy link
Contributor

Troubleshooting :)

@alexandermeindl
Copy link
Collaborator

I do not use a debian package, I used redmine tarball from redmine.org. I do not have any debian package installed for ruby support because I use RVM. Do you have any idea have to fix the problem without to install debian packages? I tried to manually install different gem packages additionally, e.g.

  • gem install markdown
  • gem install github-markdown
  • gem install redcarpet

(I removed these three packages after testing, because it did not fix my problem)

In your Gemfile you only specified gem 'github-markup'. This packages is already installed (see my list in my previous post), but redmine does not use it or another packages is required for lib/redmine_git_hosting/hooks/display_repository_readme.rb.

@n-rodriguez
Copy link
Contributor

gem install redcarpet then restart Redmine should do the trick.

@alexandermeindl
Copy link
Collaborator

I already tried it, this did not work. See above, I tried redcarpet - and of course I restartet the app server. Do you have any other other ideas?

gem list | grep 'redcarpet\|github-markup'
github-markup (1.1.1)
redcarpet (3.1.1)

@alexandermeindl
Copy link
Collaborator

I solved the problem with adding redcarpet gem to Gemfie. Without adding it, it did not work in my environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants