Alright, so I’ve been starting to use rails lately. The thing is while
getting set up I had an issue. The issue was localhost:3000 not showing
up.
I fixed it BUT when I changed the root of my application, it doesn’t
show it. In fact, it returns a routing error. The error says this:
Routing Error
No route matches [GET] “/”
Try running rake routes for more information on available routes.
When I ran it? It returned an error I think. I’ll check tonight. By
chaining the “root” I mean changing the index file. I’m on a mac right
now, but when I was using rails, I was on my windows laptop because
that’s what I use to program in general.
On Sun, Jan 6, 2013 at 9:46 PM, James Jack-Been [email protected]
wrote:
When I ran it? It returned an error I think. I’ll check tonight.
Paste the exact error message in a reply when you run it again.
By
chaining the “root” I mean changing the index file.
Please show exactly what you changed in the reply as well. Was it the
contents of public/index.html? It’s location? The config/routes.rb
file? Something else?
I’m on a mac right
now, but when I was using rails, I was on my windows laptop because
that’s what I use to program in general.
The only OS that matters in this context is the OS you are using to
run the rails app, i.e., where you ran rails server to start it up.
That’s the same directory you’ll run rake routes in, and where the
index file will be under the public directory.
On Tue, Jan 8, 2013 at 6:37 PM, James Jack-Been [email protected]
wrote:
It switched it to public/index. So, I don’t know what went wrong.
The server doesn’t know what public/index is. It knows how to serve a
file called public/index.html. When you changed it to
public/index.html, Rails starts to look in the file config/routes.rb
to determine how to satisfy web requests. You have to modify
config/routes.rb to tell Rails what it should provide as the default
route to your application.
Go work the rails tutorials, read some more. The level of issues you
are having are so elementary, it would be better if you spent time
reading and working them than asking here. No one can hold your hand
over a mailing list.
I actually did edit the config file, route already. But thanks anyways.
I guess I edited it wrong. Thanks for the advice on doing it myself. I
probably did something wrong when I edited the file but your totally
right.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.