Good evening,
Following a tutorial, I installed rails on my Ubuntu and created a new
project using the “rails” command. After starting the built-in server,
if I go to http://localhost:3000, I get the Rails welcome screen.
But after creating a controller with “./script/generate controller hello
index”, when I go to http://localhost:3000/hello, the following appears
in the console:
- → /hello
#<ArgumentError: Anonymous modules have no name to be referenced by>
[“/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:404:in
to_constant_name'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:214:in
qualified_name_for’”,
“/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:476:in
const_missing'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/dispatcher.rb:116:in
reset_after_dispatch’”,
“/usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/dispatcher.rb:50:in
dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/webrick_server.rb:113:in
handle_dispatch’”,
“/usr/lib/ruby/gems/1.8/gems/rails-1.2.5/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:inrun'", "/usr/lib/ruby/1.8/webrick/server.rb:173:in
start_thread’”,
“/usr/lib/ruby/1.8/webrick/server.rb:162:instart'", "/usr/lib/ruby/1.8/webrick/server.rb:162:in
start_thread’”,
“/usr/lib/ruby/1.8/webrick/server.rb:95:instart'", "/usr/lib/ruby/1.8/webrick/server.rb:92:in
each’”,
“/usr/lib/ruby/1.8/webrick/server.rb:92:instart'", "/usr/lib/ruby/1.8/webrick/server.rb:23:in
start’”,
“/usr/lib/ruby/1.8/webrick/server.rb:82:instart'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/webrick_server.rb:63:in
dispatch’”,
“/usr/lib/ruby/gems/1.8/gems/rails-1.2.5/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.4/lib/active_support/dependencies.rb:495:in
require'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:342:in
new_constants_in’”,
“/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:in
require'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.5/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'", "server:3"] [2007-11-11 23:15:39] ERROR
/hello’ not found.
127.0.0.1 - - [11/Nov/2007:23:15:38 BRST] “GET /hello HTTP/1.1” 404 275
I tried reinstalling Ruby and Rails, but it didn’t work.
Can someone give me a light?
Thanks.