在我的sass文件中,我使用image-url('image.png')添加了我的图像,但是在生产中它们不起作用。它应该添加一个字符串到我的图像,但它没有这样做。有人有线索我怎么能解决这个问题?image-url不会将生成的字符串添加到生产中的图像资源中。 Rails 3.1和Compass
我用指南针版本0.12.alpha.0 和Rails 3.1.0版本
捆绑
Using rake (0.9.2)
Using multi_json (1.0.3)
Using activesupport (3.1.0)
Using bcrypt-ruby (3.0.1)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.0)
Using erubis (2.7.0)
Using rack (1.3.4)
Using rack-cache (1.0.3)
Using rack-mount (0.8.3)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.0.2)
Using actionpack (3.1.0)
Using mime-types (1.16)
Using polyglot (0.3.2)
Using treetop (1.4.10)
Using mail (2.3.0)
Using actionmailer (3.1.0)
Using arel (2.2.1)
Using tzinfo (0.3.29)
Using activerecord (3.1.0)
Using activeresource (3.1.0)
Using airbrake (3.0.4)
Using ansi (1.3.0)
Using archive-tar-minitar (0.5.2)
Using bundler (1.0.18)
Using highline (1.6.2)
Using net-ssh (2.2.1)
Using net-scp (1.0.4)
Using net-sftp (2.0.5)
Using net-ssh-gateway (1.1.0)
Using capistrano (2.9.0)
Using chunky_png (1.2.5)
Using coffee-script-source (1.1.2)
Using execjs (1.2.9)
Using coffee-script (2.2.0)
Using columnize (0.3.4)
Using fssm (0.2.7)
Using sass (3.1.10)
Using compass (0.12.alpha.0)
Using compass-960-plugin (0.10.4)
Using rest-client (1.6.7)
Using couchrest (1.1.2)
Using couchrest_model (1.1.2)
Using daemons (1.0.10)
Using diff-lcs (1.1.3)
Using factory_girl (2.0.2)
Using rack-ssl (1.3.2)
Using json (1.6.1)
Using rdoc (3.10)
Using thor (0.14.6)
Using railties (3.1.0)
Using factory_girl_rails (1.1.0)
Using rails (3.1.0)
Using formtastic (2.0.0.rc5)
Using gem_plugin (0.2.3)
Using geokit (1.6.0)
Using gravatar (1.0)
Using haml (3.1.3)
Using haml-rails (0.3.4)
Using jquery-rails (1.0.14)
Using libv8 (3.3.10.2)
Using ruby_core_source (0.1.5)
Using linecache19 (0.5.12)
Using metaclass (0.0.1)
Using mocha (0.10.0)
Using money (3.1.5)
Using mongrel (1.2.0.pre2)
Using nifty-generators (0.4.6)
Using rspec-core (2.6.4)
Using rspec-expectations (2.6.0)
Using rspec-mocks (2.6.0)
Using rspec (2.6.0)
Using rspec-rails (2.6.1)
Using ruby-debug-base19 (0.11.25)
Using ruby-debug19 (0.11.6)
Using sass-rails (3.1.4)
Using state_machine (1.0.2)
Using therubyracer (0.9.4)
Using turn (0.8.2)
Using uglifier (1.0.3)
production.rb
MyApp::Application.configure do
config.cache_classes = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
# Compress JavaScripts and CSS
config.assets.compress = true
# Specify the default JavaScript compressor
config.assets.js_compressor = :uglifier
# Specifies the header that your server uses for sending files
# (comment out if your front-end server doesn't support this)
config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx
config.generators.stylesheet_engine = :sass
end
好找! +1 :) – Tilo