L
Luca Pireddu
I'm trying out the rails tutorial (http://www.rubyonrails.org/show/Tutorial).
I've reached step six where I get to access my new page but things don't work.
I'm hoping someone can help me figure out what the problem is.
I've tried accessing the page via the WEBrick servlet. I started it with
ruby dispatch.servlet -a
and then pointed my browser to http://localhost:3000/friends/display
I'm greeted with
Not Found
`/friends/display' not found.
WEBrick/1.3.1 (Ruby/1.8.2/2004-11-23) at localhost:3000
On the display WEBrick shows me the following error:
#<WEBrick::HTTPStatus::NotFound: `/friends/display' not found.>
/usr/lib/ruby/1.8/cgi/session.rb:264:in `initialize': undefined method `create_new_id' for CGI::Session:Class (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/cgi_process.rb:70:in `new'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/cgi_process.rb:70:in `session'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/base.rb:558:in`assign_shortcuts'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/base.rb:250:in`process'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/base.rb:242:in`process'
from /usr/lib/ruby/gems/1.8/gems/rails-0.8.5/lib/dispatcher.rb:35:in `dispatch'
from /home/luca/public_html/PathRails/public/dispatch.rb:10
from /home/luca/public_html/PathRails/public/dispatch.rb:1:in `load'
from /home/luca/public_html/PathRails/public/dispatch.rb:1
from -:7
#<NoMethodError: undefined method `each' for nil:NilClass>
["/usr/lib/ruby/1.8/webrick/httputils.rb:129:in `parse_header'",
"/usr/lib/ruby/gems/1.8/gems/rails-0.8.5/lib/webrick_server.rb:129:in `handle_dispatch'",
"/usr/lib/ruby/gems/1.8/gems/rails-0.8.5/lib/webrick_server.rb:75:in `handle_mapped'",
"/usr/lib/ruby/gems/1.8/gems/rails-0.8.5/lib/webrick_server.rb:30:in `do_GET'",
"/usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `__send__'",
"/usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service'",
"/usr/lib/ruby/1.8/webrick/httpserver.rb:97:in `service'",
"/usr/lib/ruby/1.8/webrick/httpserver.rb:58:in `run'",
"/usr/lib/ruby/1.8/webrick/server.rb:150:in `start_thread'",
"/usr/lib/ruby/1.8/webrick/server.rb:144:in `start'",
"/usr/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'",
"/usr/lib/ruby/1.8/webrick/server.rb:94:in `start'",
"/usr/lib/ruby/1.8/webrick/server.rb:89:in `each'",
"/usr/lib/ruby/1.8/webrick/server.rb:89:in `start'",
"/usr/lib/ruby/1.8/webrick/server.rb:79:in `start'",
"/usr/lib/ruby/1.8/webrick/server.rb:79:in `start'",
"/usr/lib/ruby/gems/1.8/gems/rails-0.8.5/lib/webrick_server.rb:17:in `dispatch'",
"dispatch.servlet:45"]
------------------------- end WEBrick error --------------------------
I've also tried with Apache, but I end up with a similar error in the log:
/usr/lib/ruby/1.8/cgi/session.rb:264:in `initialize': undefined method
`create_new_id' for CGI::Session:Class (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/cgi_process.rb:70:in `new'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/cgi_process.rb:70:in `session'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/base.rb:558:in`assign_shortcuts'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/base.rb:250:in`process'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/base.rb:242:in`process'
from /usr/lib/ruby/gems/1.8/gems/rails-0.8.5/lib/dispatcher.rb:35:in `dispatch'
from /home/luca/public_html/PathRails/public/dispatch.cgi:7
[Tue Nov 30 22:46:05 2004] [error] [client 68.148.246.54] Premature end of
script headers: /home/luca/public_html/PathRails/public/dispatch.cgi
-------------------------- end error msg ------------------
On the other hand, at the browser I'm greeted with the rails 500.html message:
Application error (Apache)
Change this error message for exceptions thrown outside of an action (like in
Dispatcher setups or broken Ruby code) in public/500.html
Here's my setup:
[fidele apache]# gem list --local
*** LOCAL GEMS ***
actionmailer (0.4.0)
Service layer for easy email delivery and testing.
actionpack (0.9.5)
Web-flow and rendering framework putting the VC in MVC.
activerecord (1.1.0)
Implements the ActiveRecord pattern for ORM.
rails (0.8.5)
Web-application framework with template engine, control-flow layer,
and ORM.
rake (0.4.11, 0.4.8)
Ruby based make-like utility.
rubygems-update (0.8.1)
RubyGems Update GEM
sources (0.0.1)
This package provides download sources for remote gem installation
[fidele apache]# ruby --version
ruby 1.8.2 (2004-11-23) [i386-linux]
[fidele apache]# apache -version
Server version: Apache/1.3.33 (Debian GNU/Linux)
Server built: Nov 18 2004 11:09:51
If there's any other info I should provide let me know. TIA
Luca
I've reached step six where I get to access my new page but things don't work.
I'm hoping someone can help me figure out what the problem is.
I've tried accessing the page via the WEBrick servlet. I started it with
ruby dispatch.servlet -a
and then pointed my browser to http://localhost:3000/friends/display
I'm greeted with
Not Found
`/friends/display' not found.
WEBrick/1.3.1 (Ruby/1.8.2/2004-11-23) at localhost:3000
On the display WEBrick shows me the following error:
#<WEBrick::HTTPStatus::NotFound: `/friends/display' not found.>
/usr/lib/ruby/1.8/cgi/session.rb:264:in `initialize': undefined method `create_new_id' for CGI::Session:Class (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/cgi_process.rb:70:in `new'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/cgi_process.rb:70:in `session'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/base.rb:558:in`assign_shortcuts'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/base.rb:250:in`process'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/base.rb:242:in`process'
from /usr/lib/ruby/gems/1.8/gems/rails-0.8.5/lib/dispatcher.rb:35:in `dispatch'
from /home/luca/public_html/PathRails/public/dispatch.rb:10
from /home/luca/public_html/PathRails/public/dispatch.rb:1:in `load'
from /home/luca/public_html/PathRails/public/dispatch.rb:1
from -:7
#<NoMethodError: undefined method `each' for nil:NilClass>
["/usr/lib/ruby/1.8/webrick/httputils.rb:129:in `parse_header'",
"/usr/lib/ruby/gems/1.8/gems/rails-0.8.5/lib/webrick_server.rb:129:in `handle_dispatch'",
"/usr/lib/ruby/gems/1.8/gems/rails-0.8.5/lib/webrick_server.rb:75:in `handle_mapped'",
"/usr/lib/ruby/gems/1.8/gems/rails-0.8.5/lib/webrick_server.rb:30:in `do_GET'",
"/usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `__send__'",
"/usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service'",
"/usr/lib/ruby/1.8/webrick/httpserver.rb:97:in `service'",
"/usr/lib/ruby/1.8/webrick/httpserver.rb:58:in `run'",
"/usr/lib/ruby/1.8/webrick/server.rb:150:in `start_thread'",
"/usr/lib/ruby/1.8/webrick/server.rb:144:in `start'",
"/usr/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'",
"/usr/lib/ruby/1.8/webrick/server.rb:94:in `start'",
"/usr/lib/ruby/1.8/webrick/server.rb:89:in `each'",
"/usr/lib/ruby/1.8/webrick/server.rb:89:in `start'",
"/usr/lib/ruby/1.8/webrick/server.rb:79:in `start'",
"/usr/lib/ruby/1.8/webrick/server.rb:79:in `start'",
"/usr/lib/ruby/gems/1.8/gems/rails-0.8.5/lib/webrick_server.rb:17:in `dispatch'",
"dispatch.servlet:45"]
------------------------- end WEBrick error --------------------------
I've also tried with Apache, but I end up with a similar error in the log:
/usr/lib/ruby/1.8/cgi/session.rb:264:in `initialize': undefined method
`create_new_id' for CGI::Session:Class (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/cgi_process.rb:70:in `new'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/cgi_process.rb:70:in `session'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/base.rb:558:in`assign_shortcuts'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/base.rb:250:in`process'
from /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/base.rb:242:in`process'
from /usr/lib/ruby/gems/1.8/gems/rails-0.8.5/lib/dispatcher.rb:35:in `dispatch'
from /home/luca/public_html/PathRails/public/dispatch.cgi:7
[Tue Nov 30 22:46:05 2004] [error] [client 68.148.246.54] Premature end of
script headers: /home/luca/public_html/PathRails/public/dispatch.cgi
-------------------------- end error msg ------------------
On the other hand, at the browser I'm greeted with the rails 500.html message:
Application error (Apache)
Change this error message for exceptions thrown outside of an action (like in
Dispatcher setups or broken Ruby code) in public/500.html
Here's my setup:
[fidele apache]# gem list --local
*** LOCAL GEMS ***
actionmailer (0.4.0)
Service layer for easy email delivery and testing.
actionpack (0.9.5)
Web-flow and rendering framework putting the VC in MVC.
activerecord (1.1.0)
Implements the ActiveRecord pattern for ORM.
rails (0.8.5)
Web-application framework with template engine, control-flow layer,
and ORM.
rake (0.4.11, 0.4.8)
Ruby based make-like utility.
rubygems-update (0.8.1)
RubyGems Update GEM
sources (0.0.1)
This package provides download sources for remote gem installation
[fidele apache]# ruby --version
ruby 1.8.2 (2004-11-23) [i386-linux]
[fidele apache]# apache -version
Server version: Apache/1.3.33 (Debian GNU/Linux)
Server built: Nov 18 2004 11:09:51
If there's any other info I should provide let me know. TIA
Luca