これを説明する最善の方法がわかりません。Rails 3.1beta と Ruby 1.9.2 を Windows 7 にインストールし、次のルートで新しいアプリを作成しました。
constraints :subdomain => 'admin' do
scope :module => "admin" do
#resources :undo_items do
#post 'undo', :on => :member
#end
#resources :projects, :domains, :emails, :databases, :admins, :services do
resources :projects do
end
#match "projects" => "projects#index"
#match "domains" => "domains#index"
root :to => "projects#index"
end
end
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
root :to => 'admin/projects#index'
サスの一例は次のとおりです。
div {
h1 { width: 177px; height: 54px;
background: url("summit-logo.png") no-repeat;
float:left; position: relative; top: 15px;
a { text-indent: -9999px; display: block;
width: 100%; height: 100%; }
}
ルートが要求された場合:
Started GET "/assets/summit-logo.png" FOR 127.0.0.1 at 2011-05-23 09:26:12 +0100
[Sprockets] /summit-logo.png 9a3c3...rest of unique request... fresh
画像は app/assets/images/summit-logo.png の下にあります
Sprockets がそれを見つけたように見えるのに、表示されていない理由についてのアイデアはありますか?
ありがとう!