Extracting OS Name

20 views
Skip to first unread message

Avi

unread,
Sep 11, 2012, 10:18:45 AM9/11/12
to rubyonra...@googlegroups.com
Hello,

From my rails application, I have given a download button, which will download a file from the server.
At the time of downloading, I want to save the values of IP Address & Client Type( from which OS - Mac/Windows/Linux & system it was downloaded ) to the database.
Any ideas how can I achieve this ?

Thanks.

Colin Law

unread,
Sep 11, 2012, 10:38:41 AM9/11/12
to rubyonra...@googlegroups.com
google for
rails get client os ip

Colin


>
> Thanks.
>
> --
> 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 rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-ta...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-talk/-/K7d_eSJtVAEJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Avi

unread,
Sep 11, 2012, 10:48:08 AM9/11/12
to rubyonra...@googlegroups.com, cla...@googlemail.com
Thanks a lot. It seems useful. I am going to try this.

thiagocifani

unread,
Sep 11, 2012, 10:49:52 AM9/11/12
to rubyonra...@googlegroups.com

Avi

unread,
Sep 11, 2012, 3:30:33 PM9/11/12
to rubyonra...@googlegroups.com
Hello,

Thanks for the reply.
I got correct solution for system os. But I am getting the ip as 127.0.0.1 which is default.
I tried a few solutions. but nothing seems to be working. All are giving me same results.
How can I change the ipaddress to the current system;s ipaddress ?

Colin Law

unread,
Sep 11, 2012, 4:29:08 PM9/11/12
to rubyonra...@googlegroups.com
On 11 September 2012 20:30, Avi <aavinas...@gmail.com> wrote:
> Hello,
>
> Thanks for the reply.
> I got correct solution for system os. But I am getting the ip as 127.0.0.1
> which is default.
> I tried a few solutions. but nothing seems to be working. All are giving me
> same results.
> How can I change the ipaddress to the current system;s ipaddress ?

That is just because you are accessing the app from the same PC as the
server is running on.
If you go to a different PC and access the server on the first PC from
there you should find that it shows the correct IP address.

Colin
> https://groups.google.com/d/msg/rubyonrails-talk/-/fmpsejw2sCUJ.

Avi

unread,
Sep 12, 2012, 1:01:44 AM9/12/12
to rubyonra...@googlegroups.com, cla...@googlemail.com
Thanks a lot. I tried with another system & it is working.
Reply all
Reply to author
Forward
0 new messages