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:
<div>
    This is a Div section in Index.htms.erb
    in app\views\home
</div>

http://localhost:3000/
Unknown action

No action responded to home. Actions: index

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"

That should be :action => "index" I think.

Colin

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:
<div>
    This is a Div section in Index.htms.erb
    in app\views\home
</div>

http://localhost:3000/
Unknown action

No action responded to home. Actions: index

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