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 ! -- Posted via http://www.ruby-forum.com/.
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 Mornini
Tom Mornini 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 MorniniHi 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/ it works fine [ no permissions issues ] but if I go to 127.0.0.1/AppName or localhost/AppName I get errors gallore... -- Posted via http://www.ruby-forum.com/.
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/ 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
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. 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 On Feb 12, 2006, at 1:38 PM, Aaron Wallis wrote:> Tom Mornini 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 Mornini > > 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/ it works fine [ no > permissions issues ] but if I go to 127.0.0.1/AppName or > localhost/AppName I get errors gallore... > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Aaron Wallis
2006-Feb-12 22:14 UTC
[Rails] Re: Re: Strange messages in "congratulations" mode
> > 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.________ -- Posted via http://www.ruby-forum.com/.