Reputation: 401
I'm attempting to try Routing for the first time. I'm following along with a book from Learn-rails.com. Author says to delete what is in config/routes.rb and replace it with: `
LearnRails::Aplication.routes.draw do
root to: redirect('/about.html')
end
After I saved the file, and then refresh localhost:3000 I get this NameError page: https://i.sstatic.net/zMfdT.jpg
It says:
Tip: add gem "binding_of_caller" to your Gemfile to enable the REPL and local/instance variable inspection.
Which I did add, and did "bundle install
". Then I tried to restart rails server in a new window, and now that won't work. If I remove what the Author said to add to the routes.rb file. Everything is fine. Does anyone have any ideas on what is going on? Thanks!
Upvotes: 0
Views: 398
Reputation: 10015
The screenshot clearly specifies, missing 'p' in LearnRails::Aplication
is creating the issue. Just replace and it should work
Upvotes: 1
Reputation: 1108
There are some exception and the better_error is unable to show the error. Add following line into gem file.
gem 'binding_of_caller', :platforms=>[:mri_19, :mri_20, :rbx]
Run 'bundle install' Then check for the exception and post it here, I will try to help with that.
Upvotes: 1