# Error! Ruby on Rails based on FastCGI, Hello world!

**URL:** <https://www.ruby-forum.com/t/error-ruby-on-rails-based-on-fastcgi-hello-world/125111>\
**Category:** Rails\
**Created:** [January 5, 2008, 5:45pm UTC](https://www.ruby-forum.com/t/error-ruby-on-rails-based-on-fastcgi-hello-world/125111 "2008-01-05T17:45:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![snoop1990](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@snoop1990](https://www.ruby-forum.com/u/snoop1990)\
**Post date:** [January 5, 2008, 5:45pm UTC](https://www.ruby-forum.com/t/error-ruby-on-rails-based-on-fastcgi-hello-world/125111/1 "2008-01-05T17:45:49Z")

</div>

Hey,  
I try to do my first steps in Ruby, and designed an “Hello World!”  
Application. Now I want to install this Application on an Apache server.

I copied it to the “/public\_html/” Directory here: (the application is  
called “rubyapp”)  
[http://sn00p.profusehost.net/rubyapp/](http://sn00p.profusehost.net/rubyapp/)

I ran [http://sn00p.profusehost.net/rubyapp/public/dispatch.fcgi](http://sn00p.profusehost.net/rubyapp/public/dispatch.fcgi) and get  
an Error. So I looked it up in the logs and get the following

no route found to match “/dispatch.fcgi” with {:method=\>:get}  
/home/sn00p/public\_html/rubyapp/public/…/config/…/vendor/rails/actionpack/lib/action\_controller/routing.rb:1292:in  
`recognize_path' /home/sn00p/public_html/rubyapp/public/../config/../vendor/rails/actionpack/lib/action_controller/routing.rb:1282:in `recognize’  
/home/sn00p/public\_html/rubyapp/public/…/config/…/vendor/rails/railties/lib/dispatcher.rb:40:in  
`dispatch' /home/sn00p/public_html/rubyapp/public/../config/../vendor/rails/railties/lib/fcgi_handler.rb:168:in `process\_request’  
/home/sn00p/public\_html/rubyapp/public/…/config/…/vendor/rails/railties/lib/fcgi\_handler.rb:143:in  
`process_each_request!' /home/sn00p/public_html/rubyapp/public/../config/../vendor/rails/railties/lib/fcgi_handler.rb:109:in `with\_signal\_handler’  
/home/sn00p/public\_html/rubyapp/public/…/config/…/vendor/rails/railties/lib/fcgi\_handler.rb:142:in  
`process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each\_cgi’  
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each\_cgi’  
/home/sn00p/public\_html/rubyapp/public/…/config/…/vendor/rails/railties/lib/fcgi\_handler.rb:141:in  
`process_each_request!' /home/sn00p/public_html/rubyapp/public/../config/../vendor/rails/railties/lib/fcgi_handler.rb:55:in `process!’  
/home/sn00p/public\_html/rubyapp/public/…/config/…/vendor/rails/railties/lib/fcgi\_handler.rb:25:in  
`process!’  
/home/sn00p/public\_html/rubyapp/public/dispatch.fcgi:26

Can you please help me, I am not familiar with this kind of log I do not  
understand what to do.

Regrades Snoop1990

---

<div class="post-metadata">

**Author:** ![snoop1990](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@snoop1990](https://www.ruby-forum.com/u/snoop1990)\
**Post date:** [January 5, 2008, 5:51pm UTC](https://www.ruby-forum.com/t/error-ruby-on-rails-based-on-fastcgi-hello-world/125111/2 "2008-01-05T17:51:41Z")

</div>

> I try to do my first steps in Ruby, and designed an “Hello World!”  
> Application. Now I want to install this Application on an Apache server.

The Application runs on webrick (the internal web server) quiet well.  
There is no database connected or so!

---

<div class="post-metadata">

**Author:** ![snoop1990](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@snoop1990](https://www.ruby-forum.com/u/snoop1990)\
**Post date:** [January 5, 2008, 6:48pm UTC](https://www.ruby-forum.com/t/error-ruby-on-rails-based-on-fastcgi-hello-world/125111/3 "2008-01-05T18:48:33Z")

</div>

dispatch.fcgi is used internally to pass information to  
RailsFCGIHandler. You dont have to worry about this.

Just call your application with the controller and actionname, that  
should just work as you do with webrick, for e.g. if you have a  
controller called hello and action called sayHello,  
[http://sn00p.profusehost.net/rubyapp/hello/sayHello](http://sn00p.profusehost.net/rubyapp/hello/sayHello) should just work.

The error that you get is because Rails’ routes is not able to match any  
path for the URL you submitted.

---

<div class="post-metadata">

**Author:** ![snoop1990](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@snoop1990](https://www.ruby-forum.com/u/snoop1990)\
**Post date:** [January 5, 2008, 7:01pm UTC](https://www.ruby-forum.com/t/error-ruby-on-rails-based-on-fastcgi-hello-world/125111/4 "2008-01-05T19:01:53Z")

</div>

Sorry i do not get this clearly !

This is my controllers directory:  
[http://sn00p.profusehost.net/rubyapp/app/controllers/](http://sn00p.profusehost.net/rubyapp/app/controllers/)

rubyapp\_controller.rb contains the index action

class RubyappController \< ApplicationController  
def index  
render :text=\> “Hello World!”  
end  
end

So I tried [http://sn00p.profusehost.net/rubyapp/rubyappcontroller/index](http://sn00p.profusehost.net/rubyapp/rubyappcontroller/index)  
and get (Error 404 not found), because apache tries to open the path  
like folders, but there are not folders.

I’m not sure, but I thought I have to run  
[http://sn00p.profusehost.net/rubyapp/public/dispatch.fcgi](http://sn00p.profusehost.net/rubyapp/public/dispatch.fcgi) to start the  
application.

---

<div class="post-metadata">

**Author:** ![snoop1990](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@snoop1990](https://www.ruby-forum.com/u/snoop1990)\
**Post date:** [January 6, 2008, 6:01pm UTC](https://www.ruby-forum.com/t/error-ruby-on-rails-based-on-fastcgi-hello-world/125111/5 "2008-01-06T18:01:11Z")

</div>

On 5 Jan 2008, at 18:01, Snoop1990 Snoop1990 wrote:

> render :text=\> “Hello World!”  
> end  
> end
> 
> So I tried [http://sn00p.profusehost.net/rubyapp/rubyappcontroller/](http://sn00p.profusehost.net/rubyapp/rubyappcontroller/)  
> index  
> and get (Error 404 not found), because apache tries to open the path  
> like folders, but there are not folders.

‘controller’ is not part of the url, so you’d wan  
[http://sn00p.profusehost.net/rubyapp/rubyapp/index](http://sn00p.profusehost.net/rubyapp/rubyapp/index)

> I’m not sure, but I thought I have to run  
> [http://sn00p.profusehost.net/rubyapp/public/dispatch.fcgi](http://sn00p.profusehost.net/rubyapp/public/dispatch.fcgi) to start  
> the  
> application.

You don’t. Apache invokes that for you

Fred

---

<div class="post-metadata">

**Author:** ![snoop1990](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@snoop1990](https://www.ruby-forum.com/u/snoop1990)\
**Post date:** [January 6, 2008, 6:48pm UTC](https://www.ruby-forum.com/t/error-ruby-on-rails-based-on-fastcgi-hello-world/125111/6 "2008-01-06T18:48:38Z")

</div>

> ‘controller’ is not part of the url, so you’d wan  
> [http://sn00p.profusehost.net/rubyapp/rubyapp/index](http://sn00p.profusehost.net/rubyapp/rubyapp/index)

Error 404: File not found!

---

<div class="post-metadata">

**Author:** ![snoop1990](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@snoop1990](https://www.ruby-forum.com/u/snoop1990)\
**Post date:** [January 6, 2008, 7:37pm UTC](https://www.ruby-forum.com/t/error-ruby-on-rails-based-on-fastcgi-hello-world/125111/7 "2008-01-06T19:37:59Z")

</div>

On 6 Jan 2008, at 17:48, Snoop1990 Snoop1990 wrote:

> > ‘controller’ is not part of the url, so you’d wan  
> > [http://sn00p.profusehost.net/rubyapp/rubyapp/index](http://sn00p.profusehost.net/rubyapp/rubyapp/index)
> 
> Error 404: File not found!

Have you told apache that [http://sn00p.profusehost.net/rubyapp/public](http://sn00p.profusehost.net/rubyapp/public)  
should be the DocumentRoot ?

Fred

---

<div class="post-metadata">

**Author:** ![snoop1990](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@snoop1990](https://www.ruby-forum.com/u/snoop1990)\
**Post date:** [January 6, 2008, 10:51pm UTC](https://www.ruby-forum.com/t/error-ruby-on-rails-based-on-fastcgi-hello-world/125111/8 "2008-01-06T22:51:17Z")

</div>

Frederick C. wrote:

> On 6 Jan 2008, at 17:48, Snoop1990 Snoop1990 wrote:
> 
> > > ‘controller’ is not part of the url, so you’d wan  
> > > [http://sn00p.profusehost.net/rubyapp/rubyapp/index](http://sn00p.profusehost.net/rubyapp/rubyapp/index)
> > 
> > Error 404: File not found!
> 
> Have you told apache that [http://sn00p.profusehost.net/rubyapp/public](http://sn00p.profusehost.net/rubyapp/public)  
> should be the DocumentRoot ?
> 
> Fred

Sorry I am on an shared host, but there is an .htaccess file inside !

Just to get that clear I have to run  
[http://sn00p.profusehost.net/rubyapp/public](http://sn00p.profusehost.net/rubyapp/public) to start the application ?
