How ro display Image

I am very new to ruby, just 10 days, I have uploade my images to
public/pictures/<user_id>/<image.jpg | .png | .gif>.

Now I want to display this image on show.rhtml.erb, but I could not
found any option to display it on the browser.

I took the whole path and the image name in @global variable and then
show it on the

imgpath="#{RAILS_ROOT} / PUBLIC/…/image.jpg"

I tried it without Rails root and pulic, but no luck.

Any one can help me to display images.

Thanks In Advance.

Abhijit

Ruby wrote:

I am very new to ruby, just 10 days, I have uploade my images to
public/pictures/<user_id>/<image.jpg | .png | .gif>.

Now I want to display this image on show.rhtml.erb, but I could not
found any option to display it on the browser.

I took the whole path and the image name in @global variable and then
show it on the

imgpath=“#{RAILS_ROOT} / PUBLIC/…/image.jpg”

I tried it without Rails root and pulic, but no luck.

Any one can help me to display images.

Thanks In Advance.

Abhijit

If you don’t want to worry about handling this stuff try attachment_fu

http://clarkware.com/cgi/blosxom/2007/02/24#FileUploadFu

simply

I’ve found the only way so far is to use image_tag . From rails
tutorial,
<%= image_tag(“image_name” , :size => “300x210” )%> the images need to
be
inside the app, i’ve used the app/assets/images location, there’s
system
and public also available, but then you need to add path info.

good luck

On 1 June 2013 16:48, bob blanton [email protected] wrote:

I’ve found the only way so far is to use image_tag . From rails tutorial,
<%= image_tag(“image_name” , :size => “300x210” )%> the images need to be
inside the app, i’ve used the app/assets/images location, there’s system
and public also available, but then you need to add path info.

Bob, did you realise that you responded to a question that is 5 years
old?

Colin

Colin L. [email protected] wrote:

On 1 June 2013 16:48, bob blanton [email protected] wrote:
[snip]
Bob, did you realise that you responded to a question that is 5 years old?

Colin

On Saturday, March 1, 2008 9:56:34 AM UTC-8, Ruby wrote:

I am so glad I’m not the only one this has happened to this
week… (different list, same issue…)