# Operational System Questiam

**URL:** <https://www.ruby-forum.com/t/operational-system-questiam/191622>\
**Category:** Rails\
**Created:** [July 15, 2010, 2:27pm UTC](https://www.ruby-forum.com/t/operational-system-questiam/191622 "2010-07-15T14:27:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![upabibi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/e19adc/32.png) [@upabibi](https://www.ruby-forum.com/u/upabibi)\
**Post date:** [July 15, 2010, 2:27pm UTC](https://www.ruby-forum.com/t/operational-system-questiam/191622/1 "2010-07-15T14:27:14Z")

</div>

Hi, i’m trying to save a file in one place if it’s Linux and another one  
if it’s WIndows…  
But if someone using Windows put to save on Linux, will show a error  
page.  
How can i verify what of those are the user using?

---

<div class="post-metadata">

**Author:** ![upabibi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/e19adc/32.png) [@upabibi](https://www.ruby-forum.com/u/upabibi)\
**Post date:** [July 15, 2010, 2:27pm UTC](https://www.ruby-forum.com/t/operational-system-questiam/191622/2 "2010-07-15T14:27:34Z")

</div>

Bla … wrote:

> Hi, i’m trying to save a file in one place if it’s Linux and another one  
> if it’s WIndows…  
> But if someone using Windows put to save on Linux, will show a error  
> page.  
> How can i verify what of those are the user using?

---

<div class="post-metadata">

**Author:** ![upabibi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/e19adc/32.png) [@upabibi](https://www.ruby-forum.com/u/upabibi)\
**Post date:** [July 15, 2010, 2:35pm UTC](https://www.ruby-forum.com/t/operational-system-questiam/191622/3 "2010-07-15T14:35:42Z")

</div>

Bla … wrote:

> Hi, i’m trying to save a file in one place if it’s Linux and another one  
> if it’s WIndows…  
> But if someone using Windows put to save on Linux, will show a error  
> page.  
> How can i verify what of those are the user using?

I believe RUBY\_PLATFORM should have that information. It’s rare that  
you’d need it, though; have you looked at the Tempdir stuff?

Best,  
–Â  
Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

Sent from my iPhone

---

<div class="post-metadata">

**Author:** ![upabibi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/e19adc/32.png) [@upabibi](https://www.ruby-forum.com/u/upabibi)\
**Post date:** [July 15, 2010, 2:43pm UTC](https://www.ruby-forum.com/t/operational-system-questiam/191622/4 "2010-07-15T14:43:49Z")

</div>

On 15 July 2010 13:27, Bla … [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Bla … wrote:
> 
> > Hi, i’m trying to save a file in one place if it’s Linux and another one  
> > if it’s WIndows…  
> > But if someone using Windows put to save on Linux, will show a error  
> > page.  
> > How can i verify what of those are the user using?

I don’t think it is possible for a web app to specify where a file is  
saved to on the users PC (assuming that is what you mean), the user  
must select that himself.

Colin
