# How to set a simple application in Apache?

**URL:** <https://www.ruby-forum.com/t/how-to-set-a-simple-application-in-apache/70732>\
**Category:** Rails\
**Created:** [February 20, 2006, 6:31am UTC](https://www.ruby-forum.com/t/how-to-set-a-simple-application-in-apache/70732 "2006-02-20T06:31:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mslagell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Post date:** [February 20, 2006, 6:31am UTC](https://www.ruby-forum.com/t/how-to-set-a-simple-application-in-apache/70732/1 "2006-02-20T06:31:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mslagell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Post date:** [February 20, 2006, 9:41am UTC](https://www.ruby-forum.com/t/how-to-set-a-simple-application-in-apache/70732/2 "2006-02-20T09:41:17Z")

</div>

> 

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](http://nflfeed.helenius.org) - Football News(DK)  
ting.minline.dk - Buy Old Stuff!(DK)

---

<div class="post-metadata">

**Author:** ![mslagell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Post date:** [February 20, 2006, 2:56pm UTC](https://www.ruby-forum.com/t/how-to-set-a-simple-application-in-apache/70732/3 "2006-02-20T14:56:24Z")

</div>

sayhello is the application name and hello is method.

please let me know how to fix it.thanks

---

<div class="post-metadata">

**Author:** ![mslagell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Post date:** [February 20, 2006, 5:56pm UTC](https://www.ruby-forum.com/t/how-to-set-a-simple-application-in-apache/70732/4 "2006-02-20T17:56:36Z")

</div>

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:

> **[Radar - O’Reilly](https://www.oreilly.com/radar/)**
>
> Now, next, and beyond: Tracking need-to-know trends at the intersection of business and technology

[http://wiki.rubyonrails.com/rails](http://wiki.rubyonrails.com/rails)

[http://rails.homelinux.org/](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

---

<div class="post-metadata">

**Author:** ![mslagell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Post date:** [February 20, 2006, 3:26pm UTC](https://www.ruby-forum.com/t/how-to-set-a-simple-application-in-apache/70732/5 "2006-02-20T15:26:31Z")

</div>

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
