# Can't reach a controller :(

**URL:** <https://www.ruby-forum.com/t/cant-reach-a-controller/114246>\
**Category:** Rails\
**Created:** [September 10, 2007, 1:34pm UTC](https://www.ruby-forum.com/t/cant-reach-a-controller/114246 "2007-09-10T13:34:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Korosu\_Itai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e47774/32.png) [@Korosu\_Itai](https://www.ruby-forum.com/u/Korosu_Itai)\
**Post date:** [September 10, 2007, 1:34pm UTC](https://www.ruby-forum.com/t/cant-reach-a-controller/114246/1 "2007-09-10T13:34:48Z")

</div>

When I try to see a controller I get a 404 error, this is what WEBrick  
says

What could it be? Thanks for the help 😉

=\> Booting WEBrick…  
=\> Rails application started on [http://0.0.0.0:3000](http://0.0.0.0:3000)  
=\> Ctrl-C to shutdown server; call with --help for options  
[2007-09-10 13:30:26] INFO WEBrick 1.3.1  
[2007-09-10 13:30:26] INFO ruby 1.8.6 (2007-06-07) [i486-linux]  
[2007-09-10 13:30:26] INFO WEBrick::HTTPServer#start: pid=6020  
port=3000  
127.0.0.1 - - [10/Sep/2007:13:30:48 CEST] “GET / HTTP/1.1” 200 7552

- → /  
127.0.0.1 - - [10/Sep/2007:13:30:48 CEST] “GET /javascripts/  
prototype.js HTTP/1.1” 200 71260  
[http://localhost:3000/](http://localhost:3000/) → /javascripts/prototype.js  
127.0.0.1 - - [10/Sep/2007:13:30:48 CEST] “GET /javascripts/effects.js  
HTTP/1.1” 200 38200  
[http://localhost:3000/](http://localhost:3000/) → /javascripts/effects.js  
127.0.0.1 - - [10/Sep/2007:13:30:48 CEST] “GET /images/rails.png HTTP/  
1.1” 200 1787  
[http://localhost:3000/](http://localhost:3000/) → /images/rails.png  
127.0.0.1 - - [10/Sep/2007:13:30:48 CEST] “GET /favicon.ico HTTP/1.1”  
200 0
- → /favicon.ico  
#\<ArgumentError: Anonymous modules have no name to be referenced by\>  
[“/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active\_support/  
dependencies.rb:404:in `to_constant_name'", "/usr/lib/ruby/gems/1.8/ gems/activesupport-1.4.2/lib/active_support/dependencies.rb:214:in `qualified\_name\_for’”, “/usr/lib/ruby/gems/1.8/gems/  
activesupport-1.4.2/lib/active\_support/dependencies.rb:476:in  
`const_missing'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/ dispatcher.rb:117:in `reset\_after\_dispatch’”, “/usr/lib/ruby/gems/1.8/  
gems/rails-1.2.3/lib/dispatcher.rb:51:in `dispatch'", "/usr/lib/ruby/ gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:113:in `handle\_dispatch’”, “/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/  
webrick\_server.rb:79:in `service'", "/usr/lib/ruby/1.8/webrick/ httpserver.rb:104:in `service’”, “/usr/lib/ruby/1.8/webrick/  
httpserver.rb:65:in `run'", "/usr/lib/ruby/1.8/webrick/server.rb: 173:in `start\_thread’”, “/usr/lib/ruby/1.8/webrick/server.rb:162:in  
`start'", "/usr/lib/ruby/1.8/webrick/server.rb:162:in `start\_thread’”,  
“/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'", "/usr/lib/ruby/ 1.8/webrick/server.rb:92:in `each’”, “/usr/lib/ruby/1.8/webrick/  
server.rb:92:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:23:in `start’”, “/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'", "/usr/ lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:63:in `dispatch’”, “/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/  
servers/webrick.rb:59”, “/usr/local/lib/site\_ruby/1.8/rubygems/  
custom\_require.rb:27:in `gem_original_require'", "/usr/local/lib/ site_ruby/1.8/rubygems/custom_require.rb:27:in `require’”, “/usr/lib/  
ruby/gems/1.8/gems/activesupport-1.4.2/lib/active\_support/  
dependencies.rb:495:in `require'", "/usr/lib/ruby/gems/1.8/gems/ activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new\_constants\_in’”, “/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/  
lib/active\_support/dependencies.rb:495:in `require'", "/usr/lib/ruby/ gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39", "/usr/local/lib/ site_ruby/1.8/rubygems/custom_require.rb:27:in `gem\_original\_require’”, "/usr/local/lib/site\_ruby/1.8/rubygems/  
custom\_require.rb:27:in `require'", "script/server:3"] [2007-09-10 13:30:51] ERROR `/say/hello’ not found.  
127.0.0.1 - - [10/Sep/2007:13:30:51 CEST] “GET /say/hello HTTP/1.1”  
404 279
- → /say/hello

---

<div class="post-metadata">

**Author:** ![Korosu\_Itai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e47774/32.png) [@Korosu\_Itai](https://www.ruby-forum.com/u/Korosu_Itai)\
**Post date:** [September 10, 2007, 3:17pm UTC](https://www.ruby-forum.com/t/cant-reach-a-controller/114246/2 "2007-09-10T15:17:03Z")

</div>

first of all, there could be a million reasons why this webrick isn’t  
running correctly, starting from the method not being there to  
permissions on your server, etc etc .

it looks as if you tried reaching

localhost:3000/say/hello .

what controller are you trying to access? according to default rail  
values (assuming u didn’t change anything) you should be trying to  
access a controller class SayController with the action hello being  
defined. (ie, you should have in your controllers/ folder a file called  
something like \* with -\>

# say\_controller.rb

class SayController \< ApplicationController  
…

# stuff

…  
.  
def hello  
#…some good code here  
end

end

is this your case so far?

---

<div class="post-metadata">

**Author:** ![Korosu\_Itai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e47774/32.png) [@Korosu\_Itai](https://www.ruby-forum.com/u/Korosu_Itai)\
**Post date:** [September 10, 2007, 9:13pm UTC](https://www.ruby-forum.com/t/cant-reach-a-controller/114246/3 "2007-09-10T21:13:28Z")

</div>

Yes, exactly, I have generated the controller using the script and I  
have an action defined on the controller (actually, is the example of  
the agile development with rails book). I haven’t changed anything of  
the settings of rails, and I’ve tried with an Apache server and it was  
a 404 too

thanks for the answer

On 10 sep, 15:17, Shai R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Korosu\_Itai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e47774/32.png) [@Korosu\_Itai](https://www.ruby-forum.com/u/Korosu_Itai)\
**Post date:** [September 10, 2007, 10:10pm UTC](https://www.ruby-forum.com/t/cant-reach-a-controller/114246/4 "2007-09-10T22:10:34Z")

</div>

I’ve been thinking about it, and I tried with the rails package from  
the debian repository, instead of the rails from gems

Now, it works properly. Thanks for the help anyway.
