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.
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’ %>
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.
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.
On Sat, Aug 29, 2009 at 1:47 PM, Jeffrey L. Taylor[email protected]
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. ------------------------ [email protected]
twitter: @hassan
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.