Reputation: 303
If I create a new project, I can click on it in my list and see the project just fine. However if I commit changes locally and push them to the remote I get an error trying to view the project's page, I get a 500 error. The production log shows the following error:
ActionView::Template::Error (undefined method `sha' for nil:NilClass):
39: = link_to project_compare_index_path(@project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-block' do
40: Compare code
41:
42: - if @repository.readme
43: - readme = @repository.readme
44: = link_to project_blob_path(@project, tree_join(@repository.root_ref, readme.name)), class: 'btn btn-block' do
45: = readme.name
app/models/repository.rb:177:in `tree'
app/models/repository.rb:161:in `block in readme'
app/models/repository.rb:160:in `readme'
app/views/projects/show.html.haml:42:in `_app_views_projects_show_html_haml___610828608301993518_70108750838020'
app/controllers/projects_controller.rb:69:in `block (2 levels) in show'
app/controllers/projects_controller.rb:63:in `show'
Started GET "/david/striker" for 99.73.162.163 at 2014-07-14 01:22:24 -0400
Processing by ProjectsController#show as HTML
I wanted to take a look at this in the console, but that doesn't seem possible. Unfortunately I don't know the password to the postgres database so I couldn't look inside the console either. It appears that the repository variable is nil inside the template.
Anyone have any ideas?
Upvotes: 1
Views: 197
Reputation: 1324887
As mentioned in issue 417, check your Ruby version:
While reverting back to 6.9.2 I add the same exact problem, which made me revert the ruby version 2.1.2p95, to the one I add before: "ruby 2.1.0p0 (2013-12-25 revision 44422)" I gave another try to gitlab 7.0 with the old ruby version and the error described before does not happen anymore
So try to see if ruby 2.1.0 works (Dec. 2013), because a more recent ruby (like 2.1.2, May 2014) might not.
Upvotes: 2