Question: Ruby on Rails routing error because of my root?

Question

Ruby on Rails routing error because of my root?

Answers 1
Added at 2016-12-26 22:12
Tags
Question

I just started using Ruby on Rails and I was following this guide and I was having trouble with 4.3 Setting the Application Home Page. It has you setting up the routes.rb like this -

Rails.application.routes.draw do
  get 'welcome/index'

  root 'welcome#index'
end

The idea is that when I go to localhost:3000 I would see a message written in my index.html.erb file. I have no idea what is wrong even tho it is simple, thanks for the help. ~Jimmy

Answers to

Ruby on Rails routing error because of my root?

nr: #1 dodano: 2016-12-27 06:12

remove get'welcome/index' check your folder structure of controller is app/controllers/welcomes_contoller then restart your server

Source Show
◀ Wstecz