similar to: Problems with request.remote_ip

Displaying 20 results from an estimated 9000 matches similar to: "Problems with request.remote_ip"

2007 Nov 23
2
Unable to read anything from request.remote_ip
For some users, request.remote_ip always return nil. According to the RAILS''s help: REMOTE_ADDR is the standard but will fail if the user is behind a proxy. HTTP_CLIENT_IP and/or HTTP_X_FORWARDED_FOR are set by proxies so check for these before falling back to REMOTE_ADDR. HTTP_X_FORWARDED_FOR may be a comma- delimited list in the case of multiple chained proxies; the first is the
2007 Jul 09
7
request.remote_ip
Hi, How can i access to request.remote_ip in a model? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to
2009 Feb 09
3
can't call request.remote_ip from object?
class User def update_metadata self.update_attributes({:last_login_at => Time.now, :last_known_up => request.remote_ip, :last_known_user_agent => request.user_agent}) end This does not work. It bombs out with: undefined local variable or method `request'' for #<User:0x1e146e0> But the request calls work in a
2007 Nov 23
4
help! problem with mongrel, request.remote_ip and lighttpd
I have an existing rails application on lighttpd and I am trrying to upgrade to mongrel for the enhanced scalability it offers. I am running mongrel 1.1.1, rails 1.2.5, lighttpd 1.4.13 and ruby 1.8.5 Everything is working great except request.remote_ip returns 127.0.0.1 or 192.168.0.102 (the internal network address of the server running lighty). I''ve seen some older posts about
2008 Sep 03
1
request.remote_ip returns kok + ip
What is this? When I use request.remote_ip in my rails app and print it to a web page it says "kok" and then the ip. What is that word there for? -- 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
2010 Mar 02
1
request.remote_ip with AJAX
Hello everyone. I have a problem with "request.remote_ip" I made an array: 1 ip = request.remote_ip 2 $ address [ip] = (: test => "OK") ... ... ... 11 ip = request.remote_ip # (along with a lot of AJAX calls) 12 response = $ address [ip] [: test] It often works, but sometimes it gives me this error: NoMethodError (undefined method `[] ''for nil:
2006 Jun 28
8
How to obtain clients IP adress
Is it possible to obtain clients adress in ruby on rails? by TheR -- Posted via http://www.ruby-forum.com/.
2008 Jan 21
7
undefined method error
Hello everyone, I am following the Practical Rails: Social Networking sites book. In chapter 7 photo gallery I am getting a NoMethodError in Pages#show Showing layouts/_menu.rhtml where line #12 raised: undefined method `new_entry_path'' for #<ActionView::Base:0x52fa56c> Extracted source (around line #12): 9: <% if is_logged_in? %> 10:
2009 Aug 21
2
Requesting a remote ip in plugin
Im creating plugin for limiting the ip, i have included the plugin name in my controller Controller: class AdminController < ApplicationController acts_as_ratelimit def login session[:user_id] = nil if request.post? user = User.authenticate(params[:name], params[:password]) if user session[:user_id] = user.id redirect_to(:controller=>"products", :action =>
2007 Dec 10
10
Reading Hash/Array
Hi all, My app is generating a form with several bill_items that should be updated (fields to be updated are description and net). The text_field_tag names are bill_item[update][#{id}][description] and bill_item[update][#{id}][net] (and I added bill_item[update][#{id}] [id] just in case) The param received is: {"commit"=>"Save",
2006 Nov 01
8
Nginx, Mongrel, Proxy and REMOTE_ADDR
I''m using a cluster of mongrels behind an apache 1.3 proxy pass. I''ve been passing the request to pen, which in turn balances the cluster of mongrels. Now, I''d like to be able to use a different server to send the static files created by the rails application, so I tried to replace pen with nginx. Everything seems to work fine except the environment variable REMOTE_ADDR.
2010 Oct 28
3
SIP client floods port 5060 and gets blocked
Hello, Is there any reason why an IP-phone would pounder on port 5060 ? My firewall blocks the public IP because it thinks the remote IP is port scanning on port 5060. I think the phone is just registering but for some reason it does this repeatedly in a very short time. Oct 28 09:01:48 astserver kernel: Firewall: *UDP_IN Blocked* IN=eth0 OUT= MAC=00:00:00:00:00:00:00:00:00:00:00:00:00:00
2007 Dec 13
10
Version naming to use in a RoR proyect
Hi everyone, I would need to know if RoR follow any policy for version naming; I mean, something like linux´s kernel does or similar. For instance, kernel uses numbers separated in groups by dots (i.e. pre 2.6 - AA.BB.CC). These groups mean differents fixtures, bugs fixed... I will start a big proyect from scratch with rails and I want to choose now a standart to use and avoid future problems
2007 Dec 11
4
Lost in translation - Rails 2.0 Nested Resources, Custom Actions
The shift to the :has_many and :has_one options when defining nested resource routes has me perplexed. The block format allows me to define custom REST actions like publish in the example below: map.resources :users do |user| user.resources :articles, :member => { :publish => :put } end It also allows for multiple levels of nesting if necessary. What I''d really like to
2008 Dec 18
5
distributing a rails application
What are the standard best practices for sharing your rails application on the web? As far as I can tell, you just delete the logs directory and clear out the database.yml What am I forgetting? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2008 Jul 28
0
Re: remote_ip always returns 127.0.0.1 (apache)
On Mon, Jul 28, 2008 at 3:09 PM, Luca Scaljery <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > I have my webrick server behind apache (all on the same server). The > problem I have now is that request.remote_ip always returns 127.0.0.1. > So it gets this IP from apache (I guess). How do I get the true client > IP address request.env[
2009 Aug 10
12
v2.0 configuration parsing
I'm trying to figure out how exactly v2.0 should be parsing configuration files. The most annoying part is if it should always just "use whatever comes first in config" or try some kind of a "use most specific rule". The "most specific" kind of makes more sense initially, but then you start wondering how to handle e.g.: 1) User logs in to imap from 192.168.0.1.
2008 Dec 05
1
page views counter
Hi all, I''ve made a really simple page views counter. def show @post = Post.find...... addcount = @post.views += 1 @post.update_attribute "views", addcount end Its working fine, but if someone hold the F5 key, it keeps counting and counting. Which is not a really good. Is there a way how to force the counter to not keep counting while someone is holding the F5 key? THX
2008 Feb 24
3
1 error(s) on assignment of multiparameter attributes
I am trying to create a form for processing credit cards. For the credit card expiration date, I would like to leave the day field out of the form for obvious reasons. However, the following code is producing an error for me. Any ideas? Thanks! <p><label for="email">Expiration</label><br/> <input type="hidden" id="user_card_expiration_3i"
2008 Jan 08
7
script/server: Permission denied
when I run script/server I get this error: script/server: Permission denied I''ve been running this app for awhile now. Not sure what would have caused the change. Any ideas? I''ve messed around with permissions on the script folder but nothing seems to work. thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received