# Strange messages in "congratulations" mode

**URL:** <https://www.ruby-forum.com/t/strange-messages-in-congratulations-mode/65966>\
**Category:** Rails\
**Created:** [February 11, 2006, 11:39pm UTC](https://www.ruby-forum.com/t/strange-messages-in-congratulations-mode/65966 "2006-02-11T23:39:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@aaron](https://www.ruby-forum.com/u/aaron)\
**Post date:** [February 11, 2006, 11:39pm UTC](https://www.ruby-forum.com/t/strange-messages-in-congratulations-mode/65966/1 "2006-02-11T23:39:15Z")

</div>

Hi All…

First off, I thought I’d let you know that im UBER new at ruby, so what  
im asking you may have a really simple answer…

Anyway, i just started using RoR and i’ve set it up on OSX, running  
Apache2.  
It all goes fine and dandy, I get the “Welcome aboard” page to say that  
its all setup and running ok, but when I click on “About your  
applications environment” it returns a message saying “For security  
purposes, this information is only available to local requests.” even  
though its all been served and requested from the same system?

Any ideas?

Thanks in advance !

---

<div class="post-metadata">

**Author:** ![aaron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@aaron](https://www.ruby-forum.com/u/aaron)\
**Post date:** [February 12, 2006, 7:06am UTC](https://www.ruby-forum.com/t/strange-messages-in-congratulations-mode/65966/2 "2006-02-12T07:06:28Z")

</div>

On Feb 11, 2006, at 2:39 PM, Aaron wrote:

> Anyway, i just started using RoR and i’ve set it up on OSX, running  
> Apache2. It all goes fine and dandy, I get the “Welcome aboard” page  
> to say that its all setup and running ok, but when I click on “About  
> your applications environment” it returns a message saying “For  
> security purposes, this information is only available to local  
> requests.” even though its all been served and requested from the  
> same system?
> 
> Any ideas?

Does it work properly with script/server (WEBrick)?

This comment isn’t about you, Aaron, but I’m completely baffled why  
so many new people go through the effort of setting up “production”  
type systems before they know anything about the system, rather than  
just go with the built in web server which pretty much always works  
perfectly.

–  
– Tom M.

---

<div class="post-metadata">

**Author:** ![aaron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@aaron](https://www.ruby-forum.com/u/aaron)\
**Post date:** [February 12, 2006, 9:38pm UTC](https://www.ruby-forum.com/t/strange-messages-in-congratulations-mode/65966/3 "2006-02-12T21:38:41Z")

</div>

Tom M. wrote:

> On Feb 11, 2006, at 2:39 PM, Aaron wrote:
> 
> > Anyway, i just started using RoR and i’ve set it up on OSX, running  
> > Apache2. It all goes fine and dandy, I get the “Welcome aboard” page  
> > to say that its all setup and running ok, but when I click on “About  
> > your applications environment” it returns a message saying “For  
> > security purposes, this information is only available to local  
> > requests.” even though its all been served and requested from the  
> > same system?
> > 
> > Any ideas?
> 
> Does it work properly with script/server (WEBrick)?
> 
> This comment isn’t about you, Aaron, but I’m completely baffled why  
> so many new people go through the effort of setting up “production”  
> type systems before they know anything about the system, rather than  
> just go with the built in web server which pretty much always works  
> perfectly.
> 
> –  
> – Tom M.

Hi Tom,

Yes the script does work fine with WEBrick.  
and i’ve since worked out the error.  
If I go to the url [http://0.0.0.0/AppName/](http://0.0.0.0/AppName/) it works fine [ no  
permissions issues ] but if I go to 127.0.0.1/AppName or  
localhost/AppName I get errors gallore…

---

<div class="post-metadata">

**Author:** ![aaron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@aaron](https://www.ruby-forum.com/u/aaron)\
**Post date:** [February 12, 2006, 10:28pm UTC](https://www.ruby-forum.com/t/strange-messages-in-congratulations-mode/65966/4 "2006-02-12T22:28:26Z")

</div>

Aaron,

There’s some built-in Rails magic that makes the “about box”  
functionality work. The “About your application’s environment” link  
invokes a controller named rails\_info\_controller.rb that lives deep  
in the guts of your Rails installation. Mine (on OS X) is in the /usr/  
local/lib/ruby/gems/1.8/gems/rails-1.0.0/builtin/ directory. Yours  
should be in the same general vicinity.

If you look inside that file, you’ll see there’s a method defined  
there called “properties”. That’s the method that services the  
rails\_info/properties action invoked by the link. The properties()  
method uses the local\_request?() method of ApplicationController to  
decide what to display. You can view the documentation for  
local\_request()? at [http://api.rubyonrails.com](http://api.rubyonrails.com). Scroll down in the  
“Methods” frame at the bottom left of your browser and click on the  
local\_request? method name to see its documentation. You should also  
be able to view the actual source code for the method from within the  
documentation as well (by clicking on the “show source” link).

From what I can tell, using 127.0.0.1 as your server address should  
work okay, but there may be something about your environment that’s  
getting in your way. You should be able to add some debug to your  
application to find out what value is getting put in  
@request.remote\_addr and go from there.

Hope this helps,  
David

---

<div class="post-metadata">

**Author:** ![aaron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@aaron](https://www.ruby-forum.com/u/aaron)\
**Post date:** [February 12, 2006, 11:14pm UTC](https://www.ruby-forum.com/t/strange-messages-in-congratulations-mode/65966/5 "2006-02-12T23:14:41Z")

</div>

> Hope this helps,  
> David

Sure does David.  
Thanks a million for the tips, i’ll dig into the debug data and see  
whats going arie…

Just for the record, yes I am using OSX, I haven’t played around much  
with the ‘host’ file, or in mac world, the netinfo settings. but scenes  
im not creating virtual hosts in apache, and rather using aliases to  
point to the public folders of the apps from within the htdocs folder.

A friend of mine mentioned it could have to do with the app not having  
www read and write permissions, so i chmod’ed them and still seem to be  
having issues.  
But i’ll take Davids advice and give it a whirl tonight…

Thanks all for the help !

**/Az.** \_\_\_\_

---

<div class="post-metadata">

**Author:** ![aaron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@aaron](https://www.ruby-forum.com/u/aaron)\
**Post date:** [February 12, 2006, 10:10pm UTC](https://www.ruby-forum.com/t/strange-messages-in-congratulations-mode/65966/6 "2006-02-12T22:10:03Z")

</div>

Hi Aaron,

Aaron Wallis wrote:

> Yes the script does work fine with WEBrick.  
> and i’ve since worked out the error.  
> If I go to the url [http://0.0.0.0/AppName/](http://0.0.0.0/AppName/) it works fine [ no  
> permissions issues ] but if I go to 127.0.0.1/AppName or  
> localhost/AppName I get errors gallore…

Is this on a Windows box? If so, do you have an entry “127.0.0.1  
AppName” in your hosts file?

Thanks,  
Bill
