Forum: Ruby on Rails how to set a simple application in Apache?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Mark S. (Guest)
on 2006-02-20 07:31
I am not familar with the RoR site stucture on Apache.
I did this 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

7. cd views            (enter views folder )
8. add a new file hello.rhtml
9. edit new file hello.rhtml
  Hello world!!
10. view this from browser

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

Mikkel B. (Guest)
on 2006-02-20 10:41
(Received via mailing list)
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.    - Football Portal(DK) - Football News(DK)      - Buy Old Stuff!(DK)
Mark S. (Guest)
on 2006-02-20 15:56
sayhello is the application name and hello is method.

please let me know how to fix it.thanks
Mark S. (Guest)
on 2006-02-20 16:26
My question is how to edit edit application.rb
and how to add views pages.

mark sheran wrote:
> sayhello is the application name and hello is method.
> please let me know how to fix it.thanks
Ben M. (Guest)
on 2006-02-20 18:56
(Received via mailing list)
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.


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!

This topic is locked and can not be replied to.