Reputation: 95
I was working my way through Hartl's Ruby on Rail's Tutorial chapter 4 when I ran into a problem. My project loaded just fine in the rails server until I added the full_title_helper.rb file.
I get:
RuntimeError (Circular dependency detected while autoloading constant FullTitleHelper):
app/controllers/application_controller.rb:1:in 'top (required)'
app/controllers/static_pages_controller.rb:1:in 'top (required)'
I tried adding config.middleware.delete Rack::Lock to my development.rb file as per this suggestion but that didn't help.
I tried switching from rails 4.0.2 to 4.0.0; that didn't work.
My full_title_helper.rb is directly from Hartl's page
module ApplicationHelper
# Returns the full title with minor modifications depending on the page
def full_title(page_title)
base_title = "Ruby on Rails Tutorial Sample App"
if page_title.empty?
base_title
else
"#{base_title} | #{page_title}"
end
end
end
What do I do to fix this?
Upvotes: 1
Views: 166
Reputation: 95
My mistake, I mis-named the helper file. Thanks to anyone who looked at this question.
Upvotes: 0