This code isn't working. whats missing?

#!/usr/bin/ruby -w
require "cgi"
$appcgi = CGI.new
puts $appcgi.header
$username = $appcgi.cookies['user']
puts "\r$username"

--
Posted via http://www.ruby-forum.com/.

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • OK OK at Mar 21, 2012 at 7:35 am
    any one?

    --
    Posted via http://www.ruby-forum.com/.

    --
    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@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Colin Law at Mar 21, 2012 at 9:05 am

    On 17 March 2012 00:49, OK OK wrote:
    This code isn't working. whats missing?

    #!/usr/bin/ruby -w
    require "cgi"
    $appcgi = CGI.new
    puts $appcgi.header
    $username = $appcgi.cookies['user']
    puts "\r$username"
    It might help if you tell us what you are trying to do and what
    actually happens. It may be that the code /is/ working but that it is
    not the right code for what you are trying to do.

    Colin

    --
    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@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Ruby User at Mar 21, 2012 at 9:58 pm
    Hi Colin,

    I am trying to read cookies for the client. The cookie values are being
    sent to the server, I can see that in http request capture.

    I am using the above ruby code to read those cookie values. And that is
    not working.


    Thanks

    --
    Posted via http://www.ruby-forum.com/.

    --
    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@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedMar 17, '12 at 12:49a
activeMar 21, '12 at 9:58p
posts4
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Ruby User: 3 posts Colin Law: 1 post

People

Translate

site design / logo © 2021 Grokbase