cloudfoundry - Rails production mode 'end' error? -


i've been trying project on cloud foundry while now, , narrowed problem down project going production mode. of errors when switching development mode production mode, somehow managed 'unexpected end' error. culprit in controller, seen below:

  companiescontroller < applicationcontroller   skip_before_filter :require_login   end    #def new 

there load of comments below section of code, nothing else. skip_before_filter refers before filter in application controller, looks this:

  class applicationcontroller < actioncontroller::base   protect_from_forgery   include sessionshelper        before_filter :require_login   def current_company    company.find_by_subdomain! request.subdomain  end  helper_method :current_company   def scope_current_company    company.current_id = current_company.id    yield  ensure    company.current_id = nil  end  def require_login   if current_user == nil     flash[:failure] = "you must log in access resource"      redirect_to signin_path    end  end end 

just sake of completeness, should mention application includes multi-tenancy based on subdomains. subdomains based on tenant table in database. clear confusion on code though, if somehow helps shed light on problem, that's great too! have taken out references multi-tenancy , sub-domains moment, , want project production mode, shouldn't affect it.

the exact error states average "unexpected keyword_end, expecting $end' in companies controller single end in code shown. doesn't make sense me though, mean needs have end there. why complain beyond me...

any appreciated.

is code companiescontroller? know class should defined instead?

class companiescontroller < applicationcontroller   skip_before_filter :require_login end 

also, if you're doing multitenancy stuff rails, might want check out book doing that: multitenancy rails.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -