Frederick Cheung wrote:
> On Nov 11, 4:19�pm, Enrico Mail <[email protected]>
> wrote:
>> and to do so I must change config/environment.rb,but in this file tell
>> me that the request.host_with_port method is undefined...help me :(
>>
> 
> host_with_port is an instance method on an individual request - you
> can't call it if you are not in the presence of an individual
> request.
> 
> Fred

ok but if i use this method so:

line50:$hostname= request.host_with_port
line51:CASClient::Frameworks::Rails::Filter.configure(
line52:...
line53: :logout_url    =>
line54: "https://myservercas/logout?service=http://#{$hostname}";,
line55:...
line56:)

gives me the same error(undefined method request...at line50).I'm in the 
presence of a request here.I couldn't use "request" and "host_with_port" 
in environment.rb,because they are undefined.Why? :(
-- 
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to