Windows --> Linux = KaBoom :-|

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?

Quoting R. [email protected]:

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

2009/8/29 Ritvvij [email protected]:

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

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. [email protected]

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

Colin


Arne De Herdt
Blog: http://risusmumblings.blogspot.com/

Quoting Hassan S. [email protected]:

Rails

Rails

Rails

I know which one I’ll pick :slight_smile:

<%= image_tag(‘rails.png’)

:wink: Jeffrey

On Sat, Aug 29, 2009 at 8:15 AM, Arne De
Herdt[email protected] 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 :slight_smile:

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

Rails

Rails

I know which one I’ll pick :slight_smile:


Hassan S. ------------------------ [email protected]
twitter: @hassan

worked. THANKS A LOT :slight_smile:

On Aug 29, 4:04 pm, Hassan S. [email protected]

On Sat, Aug 29, 2009 at 1:47 PM, Jeffrey L. Taylor[email protected]
wrote:

I know which one I’ll pick :slight_smile:

<%= 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… :slight_smile:


Hassan S. ------------------------ [email protected]
twitter: @hassan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs