问题
I have a page doesn't exist problem with my sample_app from the tutorial. I just followed all the steps and my code looks like this:
Routes
Rails.application.routes.draw do
root 'static_pages#home'
get 'static_pages/home'
get 'static_pages/help'
get 'static_pages/about'
get 'static_pages/contact'
end
Controller - the file name is static_pages_controller.rb
class StaticPagesController < ApplicationController
def home
end
def help
end
def about
end
def contact
end
end
On GET "/" i'm getting
ActionController::RoutingError (uninitialized constant StaticPagesController)
It looks like it cannot find my controller.
Thanks for any help Andrej
来源:https://stackoverflow.com/questions/48246304/rails-tutorial-chapter3-heroku-cannot-find-controller-staticpagescontroller