载波图像未加载到源代码中

不知道我在这个问题上做错了什么。 我已经按照Rails Cast for Carrierwave进行了操作,但是我遇到了一个奇怪的错误,图像根本没有显示 – (HTML)源代码显示的是图像标记,但内部没有任何内容。

组合模型代码:

class Portfolio < ActiveRecord::Base validates :title, :content, presence: true mount_uploader :feature_image, FeatureImageUploader end 

function图像上传代码:

 class FeatureImageUploader < CarrierWave::Uploader::Base storage :file def store_dir "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end def extension_white_list %w(jpg jpeg gif png) end end 

Show.html.haml代码:

 = @portfolio.title =image_tag @portfolio.feature_image_url.to_s =markdown(@portfolio.content).html_safe 

我的表格代码:

 .field = f.label :title %br = f.text_field :title .field = f.label :date %br = f.datetime_select :date .field = f.label :content %br = f.text_area :content, rows: 10 .field = f.label :feature_image = f.file_field :feature_image .actions = f.submit 

我的HTML源代码显示:

  

我进行了rake测试,一切都很好,没有失败。 有人会介意看我,真的很感激。

谢谢!

编辑

当我添加新的投资组合条目时,这是我的服务器日志中的pastebin – http://pastebin.com/1zNxB975

在视图中

 =image_tag @portfolio.feature_image.url 

和控制器

portofolios_controller.rb

 ... private def portofolio_params params.require(:portofolio).permit(:title, :date, :content, :feature_image) end 

不确定你可能拥有和需要的其他参数,但是:feature_image是必须的。