Problem viewing my hello world app

Hi,

I’ve created a hello world app that i want to view but i get
CGI::Session::CookieStore::TamperedWithCookie error in the browser when
i run it. I copied everything in my browswer below and I’ve also listed
the steps I took in creating the hello world.

My steps:

  1. rails hello
  2. generated a controller: ./script/generate controller salutation
  3. created an action by modifying salutation_controller.rb file in
    app/controller dir.
    class SalutationController < ApplicationController
    def hello
    @message = ‘hello world!’
    end
    end
  4. created an rhtml template in app/view/salutation/ called hello.rhtml
    using code below:

<%= @message %>

5. typed http://localhost:3000/salutation/hello in firefox 3.0.4 browser.

I’m using ubunut 8.10 and rails 2.2.2 and i had webrick running with
server/script command.

CGI::Session::CookieStore::TamperedWithCookie in
SalutationController#hello

CGI::Session::CookieStore::TamperedWithCookie

RAILS_ROOT: /home/mrmaster/Desktop/hello
Application Trace | Framework Trace | Full Trace

vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:144:in
unmarshal' vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:101:inrestore’
/usr/lib/ruby/1.8/cgi/session.rb:310:in []' vendor/rails/actionpack/lib/action_controller/cgi_process.rb:136:insession’
vendor/rails/actionpack/lib/action_controller/cgi_process.rb:168:in
stale_session_check!' vendor/rails/actionpack/lib/action_controller/cgi_process.rb:116:insession’
vendor/rails/actionpack/lib/action_controller/base.rb:1135:in
assign_shortcuts_without_flash' vendor/rails/actionpack/lib/action_controller/flash.rb:166:inassign_shortcuts’
vendor/rails/actionpack/lib/action_controller/base.rb:523:in
process_without_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:569:inprocess_without_session_management_support’
vendor/rails/actionpack/lib/action_controller/session_management.rb:130:in
process' vendor/rails/actionpack/lib/action_controller/base.rb:389:inprocess’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:149:in
handle_request' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:107:indispatch’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in
synchronize' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:indispatch’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:120:in
dispatch_cgi' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:35:indispatch’
vendor/rails/railties/lib/webrick_server.rb:112:in handle_dispatch' vendor/rails/railties/lib/webrick_server.rb:78:inservice’
/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’
vendor/rails/railties/lib/webrick_server.rb:62:in dispatch' vendor/rails/railties/lib/commands/servers/webrick.rb:66 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in require' vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in
new_constants_in' vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
vendor/rails/railties/lib/commands/server.rb:39
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
script/server:3

vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:144:in
unmarshal' vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:101:inrestore’
/usr/lib/ruby/1.8/cgi/session.rb:310:in []' vendor/rails/actionpack/lib/action_controller/cgi_process.rb:136:insession’
vendor/rails/actionpack/lib/action_controller/cgi_process.rb:168:in
stale_session_check!' vendor/rails/actionpack/lib/action_controller/cgi_process.rb:116:insession’
vendor/rails/actionpack/lib/action_controller/base.rb:1135:in
assign_shortcuts_without_flash' vendor/rails/actionpack/lib/action_controller/flash.rb:166:inassign_shortcuts’
vendor/rails/actionpack/lib/action_controller/base.rb:523:in
process_without_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:569:inprocess_without_session_management_support’
vendor/rails/actionpack/lib/action_controller/session_management.rb:130:in
process' vendor/rails/actionpack/lib/action_controller/base.rb:389:inprocess’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:149:in
handle_request' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:107:indispatch’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in
synchronize' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:indispatch’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:120:in
dispatch_cgi' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:35:indispatch’
vendor/rails/railties/lib/webrick_server.rb:112:in handle_dispatch' vendor/rails/railties/lib/webrick_server.rb:78:inservice’
/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’
vendor/rails/railties/lib/webrick_server.rb:62:in dispatch' vendor/rails/railties/lib/commands/servers/webrick.rb:66 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in require' vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in
new_constants_in' vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
vendor/rails/railties/lib/commands/server.rb:39
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
script/server:3

Request

Parameters:

None

Show session dump


flash: !map:ActionController::Flash::FlashHash {}

Response

Headers:

{“cookie”=>[],
“Cache-Control”=>“no-cache”}

That’s usually an indication that the cookie associated with the
localhost session (in your case it will have a name like
“_hello_session”) is different from the one your current session is
trying to create.

Use the firefox->preferences->privacy->show cookies to remove the
localhost cookie and reload the page.

Rick

On Nov 26, 11:23 am, Mrmaster M. <rails-mailing-l…@andreas-