Hi guys, I''m trying to work out how to request the URL in RoR - the only help page I''ve found is http://textsnippets com/posts/show/822 which has the following code: <% page = request.request_uri %> page: <%= page %> Whenever I try this, however, I get an error message. Any advice would be much appreciated! Thanks, Rob -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
> Whenever I try this, however, I get an error message.What''s the error message? --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Phlip wrote:>> Whenever I try this, however, I get an error message. > > What''s the error message?It''s: Internal Error Unfortunately, the server has encountered a problem displaying this page. Please try again later, or if the problem persists, contact customer services. Thanks, Rob -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
Rob Percival wrote:> Internal ErrorThat''s not the error it''s the death page in the browser. Complete error reports will contain sensitive details, so they only go to the log/production.log. Read that to find the real error. And run in development mode, to see the error in the browser. And how are your functional tests doing? They won''t exactly match server behavior, but I think you can test your situation like this: @request.request_uri = ''http://www.hogthrob.com/'' -- Phlip --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Phlip wrote:> Rob Percival wrote: > >> Internal Error > > That''s not the error it''s the death page in the browser. > > Complete error reports will contain sensitive details, so they only go > to the > log/production.log. Read that to find the real error. And run in > development > mode, to see the error in the browser. > > And how are your functional tests doing? They won''t exactly match server > behavior, but I think you can test your situation like this: > > @request.request_uri = ''http://www.hogthrob.com/'' > > -- > PhlipPhlip, Thanks very much for your reply. Unfortunately, I''m not up enough on RoR to know what the production.log or functional tests are! I''m just trying to edit a pre-existing RoR module (Hostpay with heartinternet.co.uk). I thought I would be able to do it without mucking through RoR installation, setup etc, but perhaps not! Thanks anyway, Rob -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
Rob Percival wrote:> Thanks very much for your reply. Unfortunately, I''m not up enough on RoR > to know what the production.log or functional tests are! I''m just trying > to edit a pre-existing RoR module (Hostpay with heartinternet.co.uk).If you are the software''s client, not its programmer, then is this a tech-support question for heartinternet? All the following assumes you have source; if you don''t, there''s nothing this list can do. "Nothing" is not an aphorism, because that website is probably too secure for us to get to its production log!> I > thought I would be able to do it without mucking through RoR > installation, setup etc, but perhaps not!Excellent; learning Rails is very good for you! Get "the Agile book", meaning /Agile Web Development with Rails/ by the Daves. Next, did the original author of this code write anything into the test folder? Run this line: grep test_ test/*/* | grep -v test_dummy Does it return any test cases? Next run this: rake stats Do you get a grid of statistics, and does it include a unit test count? Correlate the rows "Functional tests" and "Unit tests" with the column "methods" - the number should be higher than the number of methods in your Controllers and Models. If not, you should reject this program if possible; it''s not worth working with. However, a unit test might not capture your error, so now we are going to find the production log. Read config/deploy.rb to learn the name of the target server, and the path to the deployment location. ssh to that server. cd into the deployment folder, and look for the folders "releases" and "current". They show you are in the right spot. Then cd into "currrent/log", and enter: less production.log now search for the error, using the / command. If you get this far on any of these tips, report back here. If not, you must get tech support for this product! -- Phlip --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---