Reputation: 1435
I have created my apps and everything is there but when I go to my host address, I cannot see anything, it gives me 404 NOT FOUND
error. I also did rails server
but it seems to hang. It looks like it just stops at WEBrick:HTTPSERVER#start: pid=3457 port 3000
. And yes, when I ran rails server
it was under the app folder.
I also went to port 3000, it says this page is not available
.
When I add an index.html
file, I can see that file. But this is obviously not what I want.
What else do I need to check to get to my app?
Upvotes: 0
Views: 63
Reputation: 652
You need to configure the default route for your application, also known as root
.
Add a line like this to your routes.rb
file:
root to: 'newpage.html'
Or, if you want to route to a controller, like the show
method on the People
controller:
root to: 'people#show'
Here is the Rails guide on routing
Upvotes: 1
Reputation: 2826
Place root :to => "static#index"
in your routes file and add an index file in public/.
Upvotes: 0