similar to: Re: remote_ip always returns 127.0.0.1 (apache)

Displaying 20 results from an estimated 8000 matches similar to: "Re: remote_ip always returns 127.0.0.1 (apache)"

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
2006 Jul 23
6
routes
My best guess at how to make this route map.connect '':user'', :controller => ''user'', :action => ''profile'' makes my link_to :controller => ''admin'', :action => ''index'' stop working ? I''m needing urls like http://localhost:3000/username but without breaking all my other controller index
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 Jun 24
2
wrong number of arguments (1 for 0) when using respond_to?
Trying to get an otherwise working app (in Rails 2.0.2) up to speed with Rails 2.1.0 and Ruby 1.8.7, I have some broken code I can''t seem to fix: module Pathmaker def self.append_features( base ) base.before_save do |model| model.path = model.name.downcase. gsub( /\ and\ /, ''-'' ). gsub( /\ on\ /, ''-'' ).
2010 Jun 10
9
Rails3 beta4 + Ruby 1.9
When I try rails console using Rails3 beta4 and Ruby 1.9.1-p378 I cannot save a record: > rails console Loading development environment (Rails 3.0.0.beta4) ruby-1.9.1-p378 > g = Game.new => #<Game id: nil, player_id: nil, versus_id: nil, finished: nil, created_at: nil, updated_at: nil> ruby-1.9.1-p378 > g.save NameError: undefined method `<=>'' for class
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
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 Feb 24
1
Problems with request.remote_ip
Hello everyone, I am trying to use request.remote_ip in my application to log a user''s IP address because I have been having a lot of abuse issues. basically when a user logs I simply call user.update_attribute(:last_ip, request.remote_ip). The problem is that for some reason a lot of people that have recently logged in still have NULL listed as their last_ip in the database, even
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:
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 27
1
capistrano hangs
Any idea why this command takes upwards of 15 minutes to complete? run "cd #{release_path} && ORACLE_HOME=/home/oracle RAILS_ENV=production rake db:migrate" When running it against my local Postgres it completes in a few seconds or so. Running it against my local Oracle XE takes only slightly longer. But running it with capistrano over ssh is taking years away from my life.
2008 Jan 04
2
oracle adapter + activerecord sessions do not work
Anyone know what''s up with the activerecord session store when using the oracle adapter in Rails 2.0.2 ? I can set a session variable and can then see it''s actually set using the debugger, but after the request completes the session is empty (the @data member is nil). The session_id is staying the same and the updated_at field is being updated but nothing I put in a session
2006 Jul 03
7
form_remote_tag with multipart/form-data
Does form_remote_tag supports multipart/form-data ? My form looks like this: <%= form_remote_tag :url => { :action => ''do_image_upload'' }, :html => { :enctype => ''multipart/form-data'' } %> <%= file_field ''image'', ''file_data'', :size => 32 %> <%= submit_tag
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 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 Jun 01
0
smart data loading
I need something to load my seed data when I stage my app for milestone releases. I''m using fixtures currently but maintaining the foreign key relationships is getting more difficult as the app grows larger. I''d like something that''s aware of my foreign keys constraints and knows to load the data in the proper order. I''ve looked at FactoryGirl and seed_fu so
2007 Nov 05
0
loading fixtures into oracle
Any idea why this fixture would fail to load any data? <% %w( Admin Pharmacist PI/Co-PI Research\ Nurse ).each { |g| Group.create( :name => g ) } %> It works perfectly in irb but when I do rake db:fixtures:load I get no data, no errors, and no error logs. I realize my fixture doesn''t look like your typical run-of-the-mill fixture but it''s that way because I''m
2010 Sep 27
3
Rails3 app deploy : how to ?
Hello, I know many people are asking this kind of question. I searched in this forum and some others in the web but i did found something clear enough for my "ror''s power" (i''m not completly new but real close ;-) ) Well, I''m developing my application on os x, i''m using svn (team choice) for versionning but i will need to deploy on linux server (with
2008 Jan 21
1
RailsDB 0.2 Release
Hello, This post is to announce the latest 0.2 release of RailsDB: Q. What? A. RailsDB is a web application written in Ruby using the Ruby on Rails web framework. RailsDB provides a generic interface to popular open source databases such as MySQL, PostgreSQL, and SQLite. The RailsDB project is currently under heavy development and seeking more developers to assist. Q. Where? A.
2009 Sep 25
8
Cheapest Rails Hosting where they give you full access to Apache (to load modules etc)???
any pointers / suggestions re cheapest Rails hosting where they give you full access to Apache (to load modules etc)??? Can be a shared platform, however not sure if there is a shared platform type hosting service where they do give you such access?