Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7977427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:11:44+00:00 2026-06-04T09:11:44+00:00

Currently I am working on project like web analytic using rails 3.2.3 I have

  • 0

Currently I am working on project like web analytic using rails 3.2.3

I have two server, one is running on port 3001 and other one running on port 3000.

Here port 3001 is the server (let’s say this is Google web analytic server) and port 3000 server is the end user (let’s say this is your site). Now I need to get
request object from port 3000.

If I will write below code I can get the Browser details.

application.html.erb – This is user side code.

<script type="text/javascript" 
        src="http://localhost:3001/tracks/track_client?bwname=<%= request.env["HTTP_USER_AGENT"]  %>">
</script>

This is the server side coce

def track_client
 params.each do |key,value|
  Rails.logger.warn "Param #{key}: #{value}"
 end
end

{bwname=>Mozilla/5.0 (Windows NT 6.1", " WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2}

But I need user’s request object with all properties not specific. like I need other properties too like

"GATEWAY_INTERFACE", "PATH_INFO", "QUERY_STRING", "REMOTE_ADDR", "REMOTE_HOST", "REQUEST_METHOD", "REQUEST_URI", "SCRIPT_NAME", "SERVER_NAME", "SERVER_PORT", "SERVER_PROTOCOL", "SERVER_SOFTWARE", "HTTP_HOST", "HTTP_USER_AGENT",
"HTTP_ACCEPT",  "HTTP_ACCEPT_LANGUAGE",  "HTTP_ACCEPT_ENCODING",  "HTTP_DNT"=>"1",  "HTTP_CONNECTION", "HTTP_COOKIE", "HTTP_IF_NONE_MATCH", "HTTP_CACHE_CONTROL"

Along with this I need some other params too like something like this

<script type="text/javascript" 
        src="http://localhost:3001/tracks/track_client?userid=1234&bwname=<%= request.env %>">
</script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T09:11:45+00:00Added an answer on June 4, 2026 at 9:11 am

    Are you looking for request object?

    Please check here
    http://techoctave.com/c7/posts/25-rails-request-environment-variables

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on a C# project using ASP.NET. And I'd like to
i would like to have your opinion in a project i am currently working
Currently I'm working on Web project that is built using ASP.NET Web Forms. We
I'm currently working on a logging solution for one of our web projects. Server
I'm currently working on a web project that involves several assemblies, structured something like
I'm currently working on a project where we'd like to allow a user to
I am currently working on a project of my own and I would like
I'm currently working on a project with some fancybox (inline content). I'd like to
I'm currently working on a project running on JBoss AS 7 that requires authentication
I am working currently on a web project where users can create image galleries

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.