How to get a browser information using only ruby without rails

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

···

--
Posted via http://www.ruby-forum.com/.

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

···

--
Posted via http://www.ruby-forum.com/\.

On Linux you can use:
browser = ENV["BROWSER"].

···

*
*
This returns executable filename of browser. For example: google-chrome,
firefox.

On Mon, Dec 6, 2010 at 10:10 AM, Sniper Abandon < sathish.salem.1984@gmail.com> wrote:

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

--
Posted via http://www.ruby-forum.com/\.