我的Ruby on Rails 3.2.1 APP在Heroku上上传时不显示图片,我真的不知道问题出在哪里。在 localhost:3000 上一切正常。我做了一个测试并在内容中添加了一张图片,不是在 Nivo 滑块标签下,一切都很完美,但在 Nivo 下我的应用程序没有显示任何内容。
Nivo 滑块标签:
<div class="slider-wrapper theme-default">
<div class="ribbon"></div>
<div id="slider" class="nivoSlider">
<%=image_tag "/assets/birz.JPG"%>
<%=image_tag "100.jpg"%>
<%=image_tag "102.jpg"%>
<%=image_tag "103.jpg"%>
<%=image_tag "104.jpg"%>
<%=image_tag "105.jpg"%>
<%=image_tag "106.jpg"%>
<%=image_tag "107.jpg"%>
<%=image_tag "108.jpg"%>
<%=image_tag "109.jpg"%>
<%=image_tag "110.jpg"%>
<%=image_tag "111.jpg"%>
<%=image_tag "112.jpg"%>
</div>
</div>
生产.rb
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = true
# Compress JavaScripts and CSS
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false
# Generate digests for assets URLs
config.assets.digest = true
Heroku 堆栈:
aspen-mri-1.8.6
bamboo-mri-1.9.2
bamboo-ree-1.8.7
* cedar (beta)