Skip to content

Instantly share code, notes, and snippets.

@aus
Created March 22, 2013 18:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aus/5223613 to your computer and use it in GitHub Desktop.
Save aus/5223613 to your computer and use it in GitHub Desktop.
Log file showing gitlab looking for the charlock_holmes gem in the wrong place.
Started GET "/aus/hello-world/commit/43572c69b452b91eb0ce0d2ffbde9df2490f918b" for 127.0.0.1 at 2013-03-22 13:21:23 -0400
Processing by CommitController#show as HTML
Parameters: {"project_id"=>"aus/hello-world", "id"=>"43572c69b452b91eb0ce0d2ffbde9df2490f918b"}
Rendered commits/_commit_box.html.haml (4.6ms)
Rendered commits/_diff_head.html.haml (0.2ms)
Rendered commits/_diffs.html.haml (2.4ms)
Rendered commit/show.html.haml within layouts/project_resource (17.4ms)
Completed 500 Internal Server Error in 60ms
ActionView::Template::Error (cannot read magic file `/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes-0.6.9/ext/charlock_holmes/dst/share/misc/magic' (Permission denied)):
40: .content
41: -# Skipp all non non-supported blobs
42: - next unless file.respond_to?('text?')
43: - if file.text?
44: = render "commits/text_file", diff: diff, index: i
45: - elsif file.image?
46: - old_file = (@commit.prev_commit.tree / diff.old_path) if !@commit.prev_commit.nil?
app/views/commits/_diffs.html.haml:43:in `block in _app_views_commits__diffs_html_haml__1560861088787188954_64530640'
app/views/commits/_diffs.html.haml:17:in `each'
app/views/commits/_diffs.html.haml:17:in `each_with_index'
app/views/commits/_diffs.html.haml:17:in `_app_views_commits__diffs_html_haml__1560861088787188954_64530640'
app/views/commit/show.html.haml:9:in `_app_views_commit_show_html_haml__1512164101373977457_64559380'
@bluetsx
Copy link

bluetsx commented Mar 24, 2013

Any updates on this? I have the same issue after upgrading from 4.2 to 5.0.

As temp solution I made /home/gitlab 775 so git user can access the magic file it's looking for ...

Thanks

@bluetsx
Copy link

bluetsx commented Mar 24, 2013

I tried the following and it worked ..
This is assuming you went through the upgrade process once already ...
Take no responsibility for lost or corrupted data as a results of my post

  • stop httpd and gitlab
  • Removed /home/git/gitlab [or rename it to _old]
  • cloned the gitlab repo again with 5.0 branch
  • updated to the correct properties (gitlab.yml, database.yml, unicorn.rb)
  • sudo gem install charlock_holmes --version '0.6.9'
  • sudo -u git -H bundle install --without development test postgres --deployment
    -- if you run [grep -r "gitlab/gitlab/" *] it should return no result
  • sudo chown -R git /home/git/gitlab/log/
  • sudo chown -R git /home/git/gitlab/tmp/
  • sudo chmod -R u+rwX /home/git/gitlab/log/
  • sudo chmod -R u+rwX /home/git/gitlab/tmp/
  • sudo -u git -H mkdir /home/git/gitlab/tmp/pids/
  • sudo chmod -R u+rwX /home/git/gitlab/tmp/pids
  • start httpd and gitlab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment