Forum: Ruby on Rails images in html.erb files

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bef7651e6b8a2a4b5c37ece5783e0d34?d=identicon&s=25 Rik Stott (rikki123s)
on 2009-04-05 04:03
Hey everyone,

I was just wondering, is there any way of putting images into a html.erb
file? whenever I try it does not show the image, instead it just ignores
the code or leaves the text assigned to the image from my html code.

can anyone help me get an image onto a html.erb file? or are are
html.erb files not supposed to have images put onto them?
F2b6d7bf3a3d324a5d0fb4894923d372?d=identicon&s=25 mithila karunarathna (Guest)
on 2009-04-05 04:24
(Received via mailing list)
hi RIK,  Don't know exactly what you are asking, if you want to just put
image in your html.erb or rhtml this will work.  place your images in
"public\images" folder, and set path <img src="/images/your image name">

thanx
mithila

On Sun, Apr 5, 2009 at 7:33 AM, Rik Stott
Bef7651e6b8a2a4b5c37ece5783e0d34?d=identicon&s=25 Rik Stott (rikki123s)
on 2009-04-05 04:39
I basically want a couple of images to appear in one of the html.erb
files in my views folder. I have sent the images to my public/images
folder and have set the url for the images as how you shown above, but
it still decides to refrain from loading up onto my html.erb pages.

mithila karunarathna wrote:
> hi RIK,  Don't know exactly what you are asking, if you want to just put
> image in your html.erb or rhtml this will work.  place your images in
> "public\images" folder, and set path <img src="/images/your image name">
>
> thanx
> mithila
>
> On Sun, Apr 5, 2009 at 7:33 AM, Rik Stott
Bef7651e6b8a2a4b5c37ece5783e0d34?d=identicon&s=25 Rik Stott (rikki123s)
on 2009-04-05 04:42
ignore that, that worked, thank you

mithila karunarathna wrote:
> hi RIK,  Don't know exactly what you are asking, if you want to just put
> image in your html.erb or rhtml this will work.  place your images in
> "public\images" folder, and set path <img src="/images/your image name">
>
> thanx
> mithila
>
> On Sun, Apr 5, 2009 at 7:33 AM, Rik Stott
This topic is locked and can not be replied to.