kandanapp / kandan

Kandan is an Open Source Alternative to HipChat
GNU Affero General Public License v3.0
2.72k stars 408 forks source link

master branch missing dependencies #423

Closed danpopp closed 9 years ago

danpopp commented 9 years ago

Version 1.2 works fine, but when running off the master branch I receive 500 errors and 'something went wrong' is displayed on the front-end. When I view the logs I see there is an undefined method error thrown for `avatar_url'. Short of removing every reference to avatar_url, is there a solution to this? Perhaps a missing dependency that needs to be satisfied?

Thanks and best regards,

Started GET "/" for 10.0.2.2 at 2015-01-17 13:43:01 -0500
Processing by MainController#index as HTML
  Rendered main/_sidebar.html.erb (82.5ms)
  Rendered main/index.html.erb within layouts/application (130.5ms)
Completed 500 Internal Server Error in 503.9ms

ActionView::Template::Error (undefined method `avatar_url' for #<User:0x00000004a29c80>):
    1: <div class="header user-header">
    2:   <a href="#" class="user-menu-toggle">
    3:     <img src="<%= avatar_url_for(current_user, :size => 25) %>"/>
    4:     <i class="icon-angle button right"></i>
    5:     <%= current_user.full_name_or_username %>Attach
    6:   </a>
  app/helpers/avatar_helper.rb:3:in `avatar_url_for'
  app/views/main/_sidebar.html.erb:3:in `_app_views_main__sidebar_html_erb__2971984636861447956_38074820'
  app/views/main/index.html.erb:6:in `_app_views_main_index_html_erb___3732426839342642196_34963040'
scouttyg commented 9 years ago

Did you run any migrations after switching to master? avatar_url was an attribute to the user model added by 20130623202749_add_avatar_url_to_user.rb, which doesn't exist in 1.2.

danpopp commented 9 years ago

My mistake, after running db:migrate that solved the issue. Thanks! Sorry to trouble you.