Re: [Rails] How to capture IP address in ruby 1.8.7
ok Rafi Thank you
On Tue, Jun 18, 2013 at 1:49 PM, Rafi A <rafiglitz@gmail.com> wrote:
You cannot get this value in irb.. Controller only intended to handle the request & response. Can you try that in some controller method?
On Tue, Jun 18, 2013 at 3:35 AM, sameena Khan <emailtosameenakhan@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CABvThQdx%2BGknV%2B9JP7cxqyLYST67r53oCZ0gBxGJh7MDa7%3Dygg%40mail.gmail.com.ip = request.remote_addrWhich I am getting in irb.
NameError: undefined local variable or method `request' for #<Object:0xb785f950>
from (irb):1
from :0--On Tue, Jun 18, 2013 at 12:40 PM, Loganathan Sellapa <loganathan.ms@gmail.com> wrote:Can you copy your ruby script ?
Regards,
LoganSent from mobile device
On 18 Jun 2013 12:35, "sameena Khan" <emailtosameenakhan@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CABvThQfbk2%2Be1Pi3tQgPDfgMPaWaFAEPd%2BYgs7hgRWp3MYPJPg%40mail.gmail.com.Thanks Rafi for your reply but can I use request.remore_addr directly likeip = request.remote_addr in ruby. it is saying undefined request local vairable.--
On Tue, Jun 18, 2013 at 12:09 PM, Rafi A <rafiglitz@gmail.com> wrote:How about using request.remote_addr ?On Tue, Jun 18, 2013 at 1:56 AM, Khan <emailtosameenakhan@gmail.com> wrote:Hi all, I want to capture IP address in ruby 1.8.7 can any one help me out how to capture IP.
Thanks in advance
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/7a0ea49a-cede-4bd1-b797-26f0b8c630c9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2BfXU%2B3ngJR57FXUoHyVWPWPLfiM6zzMv%2BqRSo94Fxs1TU-Z2g%40mail.gmail.com.--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.--To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAD_i5MEuNpDEy4AgwwZjzk19ooBvjcaAO8_wF8VL4vsFrSh8JQ%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.--To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2BfXU%2B2cdZ4dq9oEcKG%2B9cCML2mvmK1ukQhA3i%3DH5CjuX9FutA%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CABvThQfyZMnzuQAm7MExRWpTcKQBk%2BvjUQG1TOz34eZ1B%2Bb_iw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home