So I asked this question already here: previous question and didn\'t get much help, I looked for other questions similar to mine, but no resolution. So I\'ll ask the question ag
It seems that you don't have a banner image for the user. If your view layout breaks because the user has no banner so use conditional if in your code
image_tag url_for(@user.banner_image) if @user.banner_image.present?
Or you may want to have a fallback image to preserve the layout
image_tag url_for(@user.banner_image || '/public/fallback_banner_image.jpg')
The above line is an example but you will need to include an actual file image/path