# Windows --\> Linux = KaBoom :-|

**URL:** <https://www.ruby-forum.com/t/windows-linux-kaboom/174607>\
**Category:** Rails\
**Created:** [August 29, 2009, 4:08pm UTC](https://www.ruby-forum.com/t/windows-linux-kaboom/174607 "2009-08-29T16:08:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ritvvij](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Ritvvij](https://www.ruby-forum.com/u/Ritvvij)\
**Post date:** [August 29, 2009, 4:08pm UTC](https://www.ruby-forum.com/t/windows-linux-kaboom/174607/1 "2009-08-29T16:08:41Z")

</div>

Hello guys,

We developed in windows and deployed on Linux server. Most of our  
partials started behaving indecently.  
Our coding \<%= render :partial =\> ‘./shared/footer’ %\>  
Deployment works with \<%= render :partial =\> ‘/shared/footer’ %\>

We have images in folders public/images/flags and public/images/  
twitter  
which we used to access image\_tag("./twitter/twitter.png"  
Now in deployment image\_tag("./twitter/twitter.png" of course does not  
work but also image\_tag("/twitter/twitter.png" doesnt work.

Does any one know about this?

---

<div class="post-metadata">

**Author:** ![Ritvvij](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Ritvvij](https://www.ruby-forum.com/u/Ritvvij)\
**Post date:** [August 29, 2009, 4:46pm UTC](https://www.ruby-forum.com/t/windows-linux-kaboom/174607/2 "2009-08-29T16:46:43Z")

</div>

Quoting R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Hello guys,
> 
> We developed in windows and deployed on Linux server. Most of our  
> partials started behaving indecently.  
> Our coding \<%= render :partial =\> ‘./shared/footer’ %\>  
> Deployment works with \<%= render :partial =\> ‘/shared/footer’ %\>

How about \<%= render :partial =\> ‘shared/footer’ %\>

Jeffrey

---

<div class="post-metadata">

**Author:** ![Ritvvij](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Ritvvij](https://www.ruby-forum.com/u/Ritvvij)\
**Post date:** [August 29, 2009, 5:11pm UTC](https://www.ruby-forum.com/t/windows-linux-kaboom/174607/3 "2009-08-29T17:11:18Z")

</div>

2009/8/29 Ritvvij [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> which we used to access image\_tag(“./twitter/twitter.png”  
> Now in deployment image\_tag(“./twitter/twitter.png” of course does not  
> work but also image\_tag(“/twitter/twitter.png” doesnt work.
> 
> Does any one know about this?

If the images are in public/images/twitter them  
image\_tag(“twitter/twitter.png”) should work. If not have a look at  
the html source in the browser and see where it is pointing.

Colin

---

<div class="post-metadata">

**Author:** ![Ritvvij](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Ritvvij](https://www.ruby-forum.com/u/Ritvvij)\
**Post date:** [August 29, 2009, 10:06pm UTC](https://www.ruby-forum.com/t/windows-linux-kaboom/174607/4 "2009-08-29T22:06:52Z")

</div>

ain’t the problem the . you’re using in the path?  
In Linux the . points to the root directory of he user, and not  
nescecarly  
to the root of the tree you’re in.

I could be mistaken though.

2009/8/29 Colin L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> > We have images in folders public/images/flags and public/images/
> 
> Colin
> 
> >

–  
Arne De Herdt  
Blog: [http://risusmumblings.blogspot.com/](http://risusmumblings.blogspot.com/)

---

<div class="post-metadata">

**Author:** ![Ritvvij](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Ritvvij](https://www.ruby-forum.com/u/Ritvvij)\
**Post date:** [August 29, 2009, 10:49pm UTC](https://www.ruby-forum.com/t/windows-linux-kaboom/174607/5 "2009-08-29T22:49:36Z")

</div>

Quoting Hassan S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> ![Rails](https://www.ruby-forum.com/images/images/rails.png)
> 
> ![Rails](https://www.ruby-forum.com/images/rails.png?1250195549)
> 
> ![Rails](https://www.ruby-forum.com/images/./images/rails.png)
> 
> I know which one I’ll pick 🙂

\<%= image\_tag(‘rails.png’)

😉 Jeffrey

---

<div class="post-metadata">

**Author:** ![Ritvvij](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Ritvvij](https://www.ruby-forum.com/u/Ritvvij)\
**Post date:** [August 29, 2009, 10:36pm UTC](https://www.ruby-forum.com/t/windows-linux-kaboom/174607/6 "2009-08-29T22:36:43Z")

</div>

On Sat, Aug 29, 2009 at 8:15 AM, Arne De  
Herdt[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> In Linux the . points to the root directory of he user, and not nescecarly  
> to the root of the tree you’re in.
> 
> I could be mistaken though.

Uh, well, since you mentioned it, yes, you are 🙂

In any case, it’s trivial to test what the image\_tag does with these  
various references:

`
<%= image_tag("images/rails.png") %>
<%= image_tag(“/images/rails.png”) %>
`

`<%= image_tag(“./images/rails.png”) %>
`

 ![Rails](https://www.ruby-forum.com/images/images/rails.png)

![Rails](https://www.ruby-forum.com/images/rails.png?1250195549)

![Rails](https://www.ruby-forum.com/images/./images/rails.png)

I know which one I’ll pick 🙂

–  
Hassan S. ------------------------ removed\_email\_address@domain.invalid  
twitter: @hassan

---

<div class="post-metadata">

**Author:** ![Ritvvij](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Ritvvij](https://www.ruby-forum.com/u/Ritvvij)\
**Post date:** [August 30, 2009, 2:28am UTC](https://www.ruby-forum.com/t/windows-linux-kaboom/174607/7 "2009-08-30T02:28:32Z")

</div>

worked. THANKS A LOT 🙂

On Aug 29, 4:04 pm, Hassan S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Ritvvij](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Ritvvij](https://www.ruby-forum.com/u/Ritvvij)\
**Post date:** [August 29, 2009, 11:06pm UTC](https://www.ruby-forum.com/t/windows-linux-kaboom/174607/8 "2009-08-29T23:06:35Z")

</div>

On Sat, Aug 29, 2009 at 1:47 PM, Jeffrey L. Taylor[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > I know which one I’ll pick 🙂
> 
> \<%= image\_tag(‘rails.png’)

True, that works with resources in RAILS\_ROOT/public/images, but  
it’s important to understand how the image\_tag references paths, to  
e.g. an alternate location like RAILS\_ROOT/public/photos.

Which would be problematic with the OP’s confusion… 🙂

–  
Hassan S. ------------------------ removed\_email\_address@domain.invalid  
twitter: @hassan
