I have code the works fine in webrick but when I use lighttpd it won''t save anything to my database. I had run into something similar before which I traced back to a print statement in my code. That''s not the case here though. Here is output from firebug: WORKS (webrick) Cache-Control: no-cache Connection: close Date: Wed, 18 Oct 2006 13:49:31 GMT Content-Type: text/javascript; charset=UTF-8 Server: WEBrick/1.3.1 (Ruby/1.8.4/2005-12-24) Content-Length: 165 Set-Cookie: _session_id=05f05d72373a31ff76cbf0645d419618; path=/ DOES NOT WORK (lighttpd) Connection: close Transfer-Encoding: chunked Content-Type: text/javascript Set-Cookie: _session_id=36fa39df475fe2c6f2ddc5128076e478; path=/ Cache-Control: no-cache Date: Wed, 18 Oct 2006 14:01:18 GMT Server: lighttpd Similar stuff, eh? Here is my controller code. Like I said, it''s not saving to my mysql database when I use lighttpd but it does on webrick. class MusiclikesController < ApplicationController def liketune @likemusic = Musiclike.new @likemusic.music_id=params[:music_id] @likemusic.vote_ip=params[:vote_ip] @likemusic.save end end It''s driving me nuts! Any lighttpd users run into this? -- 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 from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
I''ve made some progress and tracked it down to the fact that lighttpd does not capture the IP address correctly. This code: <%= @ip = request.remote_host %> gives me back the IP address in webrick but does not return anything in lighttpd Is there a universal, web-server independent method to capture IP address? 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Vince W. wrote:> I''ve made some progress and tracked it down to the fact that lighttpd > does not capture the IP address correctly. > > This code: > > <%= @ip = request.remote_host %> > > gives me back the IP address in webrick but does not return anything in > lighttpd > > Is there a universal, web-server independent method to capture IP > address?Ok, got it done with: <%= @ip = request.env["REMOTE_ADDR"] %> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Thanks for the post. I will want to use this for logging in my app. The fact that no one responded just means that you''re smarter than everyone else. Vince W. wrote:> Vince W. wrote: > >> I''ve made some progress and tracked it down to the fact that lighttpd >> does not capture the IP address correctly. >> >> This code: >> >> <%= @ip = request.remote_host %> >> >> gives me back the IP address in webrick but does not return anything in >> lighttpd >> >> Is there a universal, web-server independent method to capture IP >> address? >> > > Ok, got it done with: > > <%= @ip = request.env["REMOTE_ADDR"] %> > > Thanks.. > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---