in the controller the images files' path is "/public/images/", but in
View the path becomes "/images/", why?
Because the former is the path relative to RAILS_ROOT on your file system, and the latter is the path as part of an URI (an URL).
The Rails way to handle the latter is always thru image_path() or image_tag(). Don't get in the habit of hard-coding the /image/ part - just say image_path('myImage.png').