Hello world help

Hello all

I’m doing the hello word example out of this book called Agile Web
Development with Rails but I can’t get a result from the browser.

I’ve only had this working on windows upto now and I really would
like to get rails working on linux.

I’m just getting started in Ruby on Rails and if anybody can help
that’ll be grand.

mark.

Browser output:

Not Found
`/say/hello’ not found.
WEBrick/1.3.1 (Ruby/1.8.4/2005-12-24) at mark.shinex.com:3000

WEBrick server output:

-sh-3.1$ ruby script/server
=> Booting WEBrick…
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2007-03-28 18:50:36] INFO WEBrick 1.3.1
[2007-03-28 18:50:36] INFO ruby 1.8.4 (2005-12-24) [i386-linux]
[2007-03-28 18:50:36] INFO WEBrick::HTTPServer#start: pid=20119
port=3000
192.168.0.3 - - [28/Mar/2007:18:51:43 BST] “GET / HTTP/1.1” 200 7552

  • → /
    192.168.0.3 - - [28/Mar/2007:18:51:45 BST] “GET
    /javascripts/prototype.js HTTP/1
    .1” 200 71260
    http://mark.shinex.com:3000/ → /javascripts/prototype.js
    192.168.0.3 - - [28/Mar/2007:18:51:45 BST] “GET /javascripts/effects.js
    HTTP/1.1
    " 200 38200
    http://mark.shinex.com:3000/ → /javascripts/effects.js
    192.168.0.3 - - [28/Mar/2007:18:51:46 BST] “GET /images/rails.png
    HTTP/1.1” 200
    1787
    http://mark.shinex.com:3000/ → /images/rails.png
    192.168.0.3 - - [28/Mar/2007:18:51:46 BST] “GET /favicon.ico HTTP/1.1”
    200 0
    http://mark.shinex.com:3000/ → /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/dependencie
    s.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/rub
    y/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:476:in
    c onst_missing'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:117:i n reset_after_dispatch’”,
    “/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatch
    er.rb:51:in dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_se rver.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/s
    erver.rb:162:in start_thread'", "/usr/lib/ruby/1.8/webrick/server.rb:95:in sta
    rt’”, “/usr/lib/ruby/1.8/webrick/server.rb:92:in start'", "/usr/lib/ruby/1.8/we brick/server.rb:23:in start’”,
    “/usr/lib/ruby/1.8/webrick/server.rb:82:in star t'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:63:in dispa
    tch’”,
    “/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/webrick.rb:
    59”, “/usr/lib/ruby/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/activ
    e_support/dependencies.rb:342:in new_constants_in'", "/usr/lib/ruby/gems/1.8/ge ms/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in require’”, “/u
    sr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39”,
    "/usr/lib/ruby
    /site_ruby/1.8/rubygems/custom_require.rb:27:in require'", "script/server:3"] [2007-03-28 19:00:30] ERROR /say/hello’ not found.
    192.168.0.3 - - [28/Mar/2007:19:00:30 BST] “GET /say/hello HTTP/1.1” 404
    285
  • → /say/hello
    192.168.0.3 - - [28/Mar/2007:19:00:33 BST] “GET /favicon.ico HTTP/1.1”
    200 0
    http://mark.shinex.com:3000/say/hello → /favicon.ico

su yum install irb

fixed the problem. I can go to bed happy now.

mark