Displaying 20 results from an estimated 3000 matches similar to: "How to obtain clients IP adress"
2006 Aug 07
2
related to forms
I''m trying to construct a form that would request a page using GET and
would like my variables to be simple like q,v, etc so that the URL it
calls is something like: /controller/action?q=80&v=100
However, I''m having trouble using the basic form helpers (probably doing
something wrong) cos expressions such as:
<%= hidden_field "q", "v", {:value
2006 Jun 29
6
adding a before_filter to static content
Hi,
I have a Rails site that uses a before_filter in the application
controller that does some authentication and authorization work.
I also have a bunch of HTML in folders in the application''s public directory.
Before a user can view anything in the public directory, I''d like to
authenticate them. How could I do that?
I''m using mongrel, if it matters.
Thanks,
Joe
2006 Jun 29
8
Is This a Performance Concern?
I''m running on a brand new MacBook Pro with a relatively clean working set.
using Mongrel in production mode on port 3000. The home page does not hit
the database and I''m getting:
Processing HomeController#index (for 127.0.0.1 at 2006-06-29 14:59:02) [GET]
Session ID: e11f7df52bffff304ca7c88e672ef71a
Parameters: {"action"=>"index",
2006 Jul 20
4
setting site up on dreamhost
Hi,
was wondering if anyone has had any experience setting a site up on
dreamhost.com
Ive uploaded teh site, turned fastCGI on
However having a few problems gettign the site to show, when i go to
/public/ it shows the rails welcome page, should I be redirecting the
sit url to this?
thanks
scott
--
Posted via http://www.ruby-forum.com/.
2006 Aug 10
1
Convert datetime_select to Time object?
--------------------------
Question 1
--------------------------
I am dealing with a database that holds products and it has a datetime
field called "active_at". so I have the following for active_at:
<%= f.datetime_select :active_at %>
It gives me 5 different params:
params[:product][:active_at(1i)]
params[:product][:active_at(2i)]
params[:product][:active_at(3i)]
2006 Jun 30
1
Problems installing rails
I''ve installed Ruby and Rubygems, but when I launch the command prompt
and type:
Attempting local installation of ''rails''
Local gem file not found: rails*.gem
Attempting remote installation of ''rails''
ERROR: While executed gem ... <OpenURI : : HTTPError>
404 Not Found
Now I did something else and its saying error 300 Multiple Choices.
Is
2006 Jul 01
3
Captchas in Rails
Hello Everyone,
I was wondering what people on this list were using to generate captchas
within forms on sites they are developing? I know there is a ruby gem named
captcha, but I have seen some others floating around as well.
Thanks,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jun 29
6
Naming Convention for Controllers?
Hello!
I just read DHH''s presentation pdf.
In his examples, he wrote PeopleController instead of PersonController.
I''ve been using singular words in controller''s name.
Which is more common?
Thanks.
Sam
--
Posted via http://www.ruby-forum.com/.
2006 Jun 30
2
Subscription Payment Model
Ok, I''m new to the world of actually charging for software, and it''s
taken me a full month to decide how to charge in a way that doesn''t make
me sleep with difficulty at nights. :) If someone can look at this and
verify I''m on the right track or give any hints/tips, I''d greatly
appreciate it.
Basically, I want each user to be able to apply
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
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
2006 Jun 28
15
Its here! RubyGems Release 0.9.0
Read about it here:
http://rubyforge.org/forum/forum.php?forum_id=7575
--
Posted via http://www.ruby-forum.com/.
2006 Jun 29
9
Handling multiple developers making migrations and using svn
Hey all,
I''ve run into an interesting scenario that I think some of you might have
some suggestions on. I am currently working on a RoR project and we are
making full use of the migrations. We are also using a subversion repository
for our source control. Now, the problem....
We are both making migrations and checking them into SVN. So, if in our
checkout we have migrations up to 10 and
2009 Mar 12
3
Session Expiry
Helllo there,
Can any one help me on this "Session Expiry"
I just want to make the session expire when the system goes idle
how do i do it
yours ,
Narayanan.cj.
--~--~---------~--~----~------------~-------~--~----~
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
2006 Aug 09
8
AJAX image manipulation
I have this code in a controller that returns images to my browser...with
ROR.
def index
@products = Product.find_all_ pictures
end
....this is the .rhtml..
<% for photo in @pic -%>
<div class="entry">
<img src="<%= photo.image_url %>"/>
<h3><%= h(photo.title) %></h3>
<%= photo.description %>
2012 Dec 06
2
pasenger does not start puppet master under nginx
On the server
[root@bangvmpllDA02 logs]# ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
[root@bangvmpllDA02 logs]# puppet --version
3.0.1
and
[root@bangvmpllDA02 logs]# service nginx configtest
nginx: the configuration file /apps/nginx/nginx.conf syntax is ok
nginx: configuration file /apps/nginx/nginx.conf test is successful
[root@bangvmpllDA02 logs]# service nginx status
2011 Jul 08
2
Puppetmaster setup with separate CA server configuration help
Hi All,
I am setting up puppetmaster with nginx and passenger and separating
the Puppetmaster primary CA server. I have 3 host
loadbalancer01 - Nginx doing LB on IP address and also running
puppetmaster with passenger under 127.0.0.1 (port 8140).
primaryca - Puppetmaster Primary CA
pclient - Puppet Client
The did the following steps:
On Primary CA server:
----------------------------
cd
2009 Mar 25
3
List of databases supported by Rails
Where can I obtain list of databases supported by Ruby on Rails?
Thanks
TheR
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe
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
2006 Mar 10
2
Sharing of Libraries (S+ and R)
Hi,
Can anyone please advise if there is a neat way to 'share' libraries of
(previously developed) S+ code with R?
Specifically, within S+ I can use the attach(what = "<Chapter Directory>",
pos = 2) command, to retrieve previously developed functions and variables
to position 2 in the search list. [Some may be intentionally masked by
what's in the current working