No reasonable output created from Rails app

Hi All,

I’ve got a Rails app that I broke by adding some code from a book. To
unravel this I tried to just get something working but only got an
error message. I expected the following code to transfer control to
the index method in the view and have it yield the text there with
appropriate HTML glued around it.

Is there a simple fix so I could just get something working?

Thanks in advance,
Richard

config\routes.rb:
ActionController::Routing::Routes.draw do |map|
map.connect ‘’, :controller => “home”, :action => “home”

snip

app\controllers\home_controller.rb:
class HomeController < ApplicationController
def index
@title = “RTS: Receipts Tracking System”
end
end

app\views\home\index.html.erb:

This is a Div section in Index.htms.erb in app\views\home

http://localhost:3000/
Unknown action

No action responded to home. Actions: index

On Mon, 2010-03-01 at 13:42 -0800, RichardOnRails wrote:

Thanks in advance,
def index
http://localhost:3000/
Unknown action

No action responded to home. Actions: index


I think you want to change…

map.connect ‘’, :controller => “home”, :action => “home”

to

map.connect ‘’, :controller => “home”, :action => “index”

restart the ‘server’ (script/server)

Craig


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

On 1 March 2010 21:42, RichardOnRails
[email protected] wrote:

Thanks in advance,
Richard

config\routes.rb:
ActionController::Routing::Routes.draw do |map|
map.connect ‘’, :controller => “home”, :action => “home”

That should be :action => “index” I think.

Colin

Hi Colin and Craig,

Thank you very much. Of course I meant “index” but had so many
failures I was approaching brain-dead. Now I’m back on new errors I
can deal with.

Best wishes,
Richard

On Mar 1, 4:42 pm, RichardOnRails

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs