undefined method `settings' for nil:NilClass
Created by: HatemMahmoud
Hi,
I just cloned the repo, run rake db:seed and created a new user using the console. Now trying to sign in gives this error:
Showing /Users/hatem/Projects/ExpressionLab/AlsahryCenter/CyDoc/app/views/layouts/application.html.haml where line #27 raised:
undefined method `settings' for nil:NilClass Extracted source (around line #27):
24: = t('application.title')
25:
26: - if user_signed_in?
27: = render_navigation(:level => 1..2, :expand_all => true)
28: = form_tag search_path, :method => :get, :class => "navbar-search pull-left" do
29: = text_field_tag "query", params[:query], :placeholder => t('placeholder.search'), :class => "search-query"
30: %div= render 'users/user_bar'
Imported comments:
By HatemMahmoud on 2014-10-09 12:59:40 UTC
I've just commented that line and could see the home page. Now trying to click any link results in the authorisation error: "Sie sind nicht berechtigt diese Seite anzuzeigen".
So what is the correct way to add users and assign permissions?
I'm using version 2.0.0.rc6 on Ruby 1.9.3 and Rails 3.2.18
Thanks for your help.
By huerlisi on 2014-10-13 13:20:58 UTC
Hi @HatemMahmoud
I'm quite busy today and tomorrow, but will reproduce and give you some tips in the next few days;-)
By huerlisi on 2014-10-17 14:35:35 UTC
The problem you've experienced is that the user does not have an assigned tenant.
I've updated the db/seeds.rb to create an initial Tenant and User so you can login right after seeding. The INSTALL.textile is now also updated to reality, including instructions to setup sphinx for freetext search.
There's probably still a some things failing after an initial setup as that has not gotten a lot of testing recently...
Keep filing issues, and I'll try to help you:-)
By HatemMahmoud on 2014-10-23 07:16:54 UTC
Thanks @huerlisi! I'll try it and keep you updated.
By huerlisi on 2014-11-14 10:10:41 UTC
Success?
By huerlisi on 2015-01-02 14:22:03 UTC
@HatemMahmoud is this still an issue?