我哪里错了?我应该错过一些重要的伎俩.... 编译资产后,在开发模式下运行我的应用程序,转到root url
.. **。我只是得到一个白页.... 是因为我在localhost上以dev模式运行吗?
控制台:
>> Listening on 0.0.0.0:3000, CTRL+C to stop
Started GET "/" for 127.0.0.1 at 2013-02-12 19:09:46 +0100
Processing by WelcomeController#index as HTML
..... more ...
Rendered welcome/index.html.haml within layouts/application (438.3ms)
Completed 200 OK in 3700ms (Views: 539.7ms | ActiveRecord: 101.8ms)
Started GET "/fr/application.manifest" for 127.0.0.1 at 2013-02-12 19:09:51 +0100
CACHE MANIFEST
# b674b99ed2e29478bf9b8887fd1448dcd5755e2b2f8882a9abf2030d70ae5ae5
404.html
422.html
500.html
offline.html
assets/application-cb5548d93b80852ceb169309f728eb75.js
.... more assets ....
在我的application.html.haml
中 %html{:lang => "en", :manifest => manifest_path }
在我的routes.rb
中 Rack::Offline.configure do
cache "assets/application.js"
cache "assets/application.css"
network "/"
end
match "/application.manifest" => Rails::Offline, :as => :manifest
在我的mimes_types.rb
中Mime::Type.register "text/cache-manifest", :manifest