hi,
i want to display a image in the view:
<%= image_tag("#{RAILS_ROOT}/public/images/freinds/
user"+@users[''id''].to_s+".png") %>
in the view i just see a small square to mark to place pf the
image,but the pic dont display.
when i follow the url of the pic i have this:
http://localhost:3000/home/delmed/servadmin/public/images/freinds/user3.png
and it say: No route matches "/home/delmed/servadmin/public/images/
freinds/user3.png"
the pic exesit in the folder.
what can i do please.
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
If your image is in the images folder under your public folder, you
don''t
need to include anything before the "images/" part of the URL. So you
can
just do this:
<%= image_tag("freinds/user" + @users[''id''].to_s
+ ".png") %>
Also, you have "friends" spelled incorrectly. Not sure if
that''s intentional
or not.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/dTMY8dTtHU8J.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
thanks man,you realy help me :) for the freinds,its a mistake, i always write it like this :$ :) On Jun 20, 7:49 pm, Tim Shaffer <timshaf...-BUHhN+a2lJ4@public.gmane.org> wrote:> If your image is in the images folder under your public folder, you don''t > need to include anything before the "images/" part of the URL. So you can > just do this: > > <%= image_tag("freinds/user" + @users[''id''].to_s + ".png") %> > > Also, you have "friends" spelled incorrectly. Not sure if that''s intentional > or not.-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.