Hello! This is my first time with RoR and web development :P I''m trying to run the "hello world" script from the book Agile Wev Development with Rails... I''ve created my "SayController": class SayController < ApplicationController def hello end end and I''ve created my hello.rhtml with basic html that shows "Hello from Rails!". However, when I try to access it, I get this error from the Webrick console: (I''m trying to go to http://localhost:3000/say/hello) #<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-03 20:31:15] ERROR `/say/hello'' not found. 127.0.0.1 - - [03/Sep/2007:20:31:15 CEST] "GET /say/hello HTTP/1.1" 404 279 - -> /say/hello I don''t know why it doesn''t work, any idea? Thanks ;) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rein Henrichs
2007-Sep-03 18:39 UTC
Re: Anonymous modules have no name to be referenced by
Did you create the controller with script/generate? On Sep 3, 1:34 pm, Korosu Itai <korosu.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello! This is my first time with RoR and web development :P > > I''m trying to run the "hello world" script from the book Agile Wev > Development with Rails... > > I''ve created my "SayController": > > class SayController < ApplicationController > def hello > end > end > > and I''ve created my hello.rhtml with basic html that shows "Hello from > Rails!". > > However, when I try to access it, I get this error from the Webrick > console: > (I''m trying to go tohttp://localhost:3000/say/hello) > > #<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-03 20:31:15] ERROR `/say/hello'' not found. > 127.0.0.1 - - [03/Sep/2007:20:31:15 CEST] "GET /say/hello HTTP/1.1" > 404 279 > - -> /say/hello > > I don''t know why it doesn''t work, any idea? Thanks ;)--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
yes, exactly like says the book On 3 sep, 20:39, Rein Henrichs <rein.henri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Did you create the controller with script/generate? > > On Sep 3, 1:34 pm, Korosu Itai <korosu.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hello! This is my first time with RoR and web development :P > > > I''m trying to run the "hello world" script from the book Agile Wev > > Development with Rails... > > > I''ve created my "SayController": > > > class SayController < ApplicationController > > def hello > > end > > end > > > and I''ve created my hello.rhtml with basic html that shows "Hello from > > Rails!". > > > However, when I try to access it, I get this error from the Webrick > > console: > > (I''m trying to go tohttp://localhost:3000/say/hello) > > > #<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-03 20:31:15] ERROR `/say/hello'' not found. > > 127.0.0.1 - - [03/Sep/2007:20:31:15 CEST] "GET /say/hello HTTP/1.1" > > 404 279 > > - -> /say/hello > > > I don''t know why it doesn''t work, any idea? Thanks ;)--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
No one knows why I get an 404error when try to see the controller? I need some help with that :S On 3 sep, 20:49, Korosu Itai <korosu.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> yes, exactly like says the book > > On 3 sep, 20:39, Rein Henrichs <rein.henri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Did you create the controller with script/generate? > > > On Sep 3, 1:34 pm, Korosu Itai <korosu.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hello! This is my first time with RoR and web development :P > > > > I''m trying to run the "hello world" script from the book Agile Wev > > > Development with Rails... > > > > I''ve created my "SayController": > > > > class SayController < ApplicationController > > > def hello > > > end > > > end > > > > and I''ve created my hello.rhtml with basic html that shows "Hello from > > > Rails!". > > > > However, when I try to access it, I get this error from the Webrick > > > console: > > > (I''m trying to go tohttp://localhost:3000/say/hello) > > > > #<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-03 20:31:15] ERROR `/say/hello'' not found. > > > 127.0.0.1 - - [03/Sep/2007:20:31:15 CEST] "GET /say/hello HTTP/1.1" > > > 404 279 > > > - -> /say/hello > > > > I don''t know why it doesn''t work, any idea? Thanks ;)--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---