How to set a simple application in Apache?

I am not familar with the RoR site stucture on Apache.
I did this but.it doen’t work.

I only want to output a word on a page with RoR.

I did this

  1. cd public_html (enter web root)

  2. rails sayhello

  3. cd sayhello

  4. cd app

  5. cd controller (enter controller folder)

  6. edit application.rb

def hello
end

  1. cd views (enter views folder )
  2. add a new file hello.rhtml
  3. edit new file hello.rhtml
test Hello world!! 10. view this from browser http://*****/sayhello/hello

but I get 404 error

I test ruby -v and rails -v.I am sure the installation is fine.this is a
RoR hosting provider.

Thank you for help

Mark

You dont have a sayhello controller in your code, You added the action
to application which isnt really what you want…

It seems like you need to read some rails tutorials…try google

Mikkel B.

www.strongside.dk - Football Portal(DK)
nflfeed.helenius.org - Football News(DK)
ting.minline.dk - Buy Old Stuff!(DK)

sayhello is the application name and hello is method.

please let me know how to fix it.thanks

Your understanding of how rails works is pretty far off base. I, or
someone else, could
write up a long explanation of how it works, but there are already lots
of good tutorials
out there. And one of the central tenets of rails is that you Don’t
Repeat Yourself.

So:

http://wiki.rubyonrails.com/rails

http://rails.homelinux.org/

Read some stuff from those. The first link is a tutorial that has a
“hello world” page as
one step. It’s second page talks all about the structure of a rails app.

And I hate to say it, but these may not be enough to really learn
rails… I’ve found the
“Agile Web D. with Rails” book indispensible.

Good luck!

b

My question is how to edit edit application.rb
and how to add views pages.

Mark
mark sheran wrote:

sayhello is the application name and hello is method.

please let me know how to fix it.thanks