Forum: Ruby on Rails localhost:3000

0ec3a97cb8b186a2d3388ab4e7b1efab?d=identicon&s=25 James Jack-Been (ghostheadx)
on 2013-01-06 23:16
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?
Bee69cfed999cd13e3bff73d472a39ee?d=identicon&s=25 Hassan Schroeder (Guest)
on 2013-01-07 00:04
(Received via mailing list)
On Sun, Jan 6, 2013 at 2:16 PM, James Jack-Been <lists@ruby-forum.com>
wrote:
> Alright, so I've been starting to use rails lately. The thing is

Suggested: http://www.catb.org/esr/faqs/smart-questions.html

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Aa082c8b00a50928e5860dcd70bf2368?d=identicon&s=25 tamouse mailing lists (Guest)
on 2013-01-07 04:38
(Received via mailing list)
On Sun, Jan 6, 2013 at 4:16 PM, James Jack-Been <lists@ruby-forum.com>
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?
0ec3a97cb8b186a2d3388ab4e7b1efab?d=identicon&s=25 James Jack-Been (ghostheadx)
on 2013-01-07 04:46
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.
Aa082c8b00a50928e5860dcd70bf2368?d=identicon&s=25 tamouse mailing lists (Guest)
on 2013-01-07 05:01
(Received via mailing list)
On Sun, Jan 6, 2013 at 9:46 PM, James Jack-Been <lists@ruby-forum.com>
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.
82da79105dc32234c81e4971983dc541?d=identicon&s=25 Anush J. (anush_j)
on 2013-01-07 22:44
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
91b3732802a60021792ce7bdd577e815?d=identicon&s=25 Martin Aceto (Guest)
on 2013-01-07 23:03
(Received via mailing list)
Hi Anush,

read this link, read about the defaults routes of Rails

http://guides.rubyonrails.org/routing.html

M
0ec3a97cb8b186a2d3388ab4e7b1efab?d=identicon&s=25 James Jack-Been (ghostheadx)
on 2013-01-09 01:37
Oh my god. I just realized I don't know how to run an error. LOL!!!
Could someone help me with that?
0ec3a97cb8b186a2d3388ab4e7b1efab?d=identicon&s=25 James Jack-Been (ghostheadx)
on 2013-01-09 01:37
It switched it to public/index. So, I don't know what went wrong.
Aa082c8b00a50928e5860dcd70bf2368?d=identicon&s=25 tamouse mailing lists (Guest)
on 2013-01-09 04:21
(Received via mailing list)
On Tue, Jan 8, 2013 at 6:37 PM, James Jack-Been <lists@ruby-forum.com>
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.
0ec3a97cb8b186a2d3388ab4e7b1efab?d=identicon&s=25 James Jack-Been (ghostheadx)
on 2013-01-10 00:07
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.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.