I am trying to create a static page. I typed $ rails generate controller StaticPages home help --no-test-framework
and got the output below.
conflict app/controllers/static_pages_controller.rb
Overwrite
/Users/themaktravels/rails_projects/sample_app/app/controllers/static_pages_controller.rb? (enter "h" for help) [Ynaqdh] d
class StaticPagesController < ApplicationController
- def ...
+ def home
+ end
+
+ def help
end
end
Retrying...
I tried to see what the difference is, but I am not familiar with this to understand what the difference is. When I tried to not overwrite the file and then tested the URL, I got this error on my page.
Routing Error
No route matches [GET] "/static_pages/home"
Try running rake routes for more information on available routes.
I then tried to checkout my changes with GIT and then tried to run rake routes
bundle update rake
bundle show rake
require 'rake/dsl_definition'
But my static page still shows an error. Any suggestions? Thank you!