Localhost:3000

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.


Help?

On Sun, Jan 6, 2013 at 2:16 PM, James Jack-Been [email protected]
wrote:

Alright, so I’ve been starting to use rails lately. The thing is

Suggested: How To Ask Questions The Smart Way


Hassan S. ------------------------ [email protected]

twitter: @hassan

On Sun, Jan 6, 2013 at 4:16 PM, James Jack-Been [email protected]
wrote:

No route matches [GET] “/”

Try running rake routes for more information on available routes.

What did you get when you ran this?

When you say “changed the root of my application”, what, exactly, did
you change?

What OS are you using?

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.

Trying adding the route to your routes.rb file manually and run rake
routes,

Example:
ActionController::Routing::Routes.draw do |map|
map.connect ‘products’, :controller => ‘catalog’, :action => ‘view’
end

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.

Hi Anush,

read this link, read about the defaults routes of Rails

M

It switched it to public/index. So, I don’t know what went wrong.

Oh my god. I just realized I don’t know how to run an error. LOL!!!
Could someone help me with that?

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.