How to get a browser information using only ruby without rails

P

Priyank Shah

Hi All,


I want to get a browser information which user use on its machine but,

I want to get only by using ruby not want to use rails.

i tried

puts ENV['HTTP_USER_AGENT']

but it gives nil.


so please if any one has idea help me.

Thanks,
Priyank Shah
 
S

Sniper Abandon

Priyank Shah wrote in post #966420:
I want to get a browser information which user use on its machine but,
I want to get only by using ruby not want to use rails.

What do you mean "only by using ruby not want to use rails" ?

may be try this

request.env["HTTP_USER_AGENT"]




Regards

Thaniyarasu
Castlerock Research
 
D

Dmytro Gladkyi

[Note: parts of this message were removed to make it a legal post.]

On Linux you can use:
browser = ENV["BROWSER"].
*
*
This returns executable filename of browser. For example: google-chrome,
firefox.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top