Good day, people,
I installed a fully working Ruby on Rails on my Debian Squeeze system
today and am studying a tutorial about Ruby on Rails right now.
It says that in the main folder of my app, I should type

ruby script/generate controller Stories index

Good, but that seems to be for older ruby versions than mine. I get a
'file not found' error.
So I took a little look around the directory and found that I may use:

ruby script/rails generate controller Stories index

Now I get the following:

      create  app/controllers/stories_controller.rb
       route  get "stories/index"
      invoke  erb
      create    app/views/stories
      create    app/views/stories/index.html.erb
      invoke  test_unit
      create    test/functional/stories_controller_test.rb
      invoke  helper
      create    app/helpers/stories_helper.rb
      invoke    test_unit
      create      test/unit/helpers/stories_helper_test.rb

Good! Then it's said that I should go to http://localhost:3000/stories
where I would find a quite empty starting page. But the only thing
I'll get is

Routing Error
No route matches "/stories"

I thought for a second and typed in http://localhost:3000/stories/index
, and I get

Stories#index
Find me in app/views/stories/index.html.erb

Huh. That's good for the time being, because something happens in some
kind and I got a functioning (at least halfway) controller. But why
won't it use /stories/index just for the parent directory /stories --
and especially: Why doesn't it do that as _automatically by official
Ruby on Rails tools generated_ code? Would look some kinda stupid when
every url of my website will have /index at the end. >:s

Regards,
Simon

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to