无法通过rake资产预先编译rails应用程序中的所有文件(app \ assets):预编译

时间:2015-06-10 15:19:45

标签: ruby-on-rails ruby-on-rails-3.1

我有一个rails应用程序并尝试在Win2012上运行它到我的本地服务器。

https://github.com/carloscoca/loccasions

我尝试通过命令rake assets:precompile预编译app \ assets中的所有文件,但没有出现错误。

但是,我通过localhost运行网站,但看起来不完整它需要一些文件,我检查了日志文件。 (有些文件是预编译而不是其他文件,在清单文件中是相同的。)

我尝试了config.assets.compile = true,而不是结果和一些配置,没有运气

Started GET "/stylesheets/layout.css" for 127.0.0.1 at 2015-06-07 10:28:45 -0400

ActionController::RoutingError (No route matches [GET] "/stylesheets/layout.css"):


Rendered C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.0ms)


Started GET "/assets/default.css" for 127.0.0.1 at 2015-06-07 10:28:45 -0400
Served asset /default.css - 404 Not Found (2ms)

ActionController::RoutingError (No route matches [GET] "/assets/default.css"):


Rendered C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.0ms)


Started GET "/assets/default.js" for 127.0.0.1 at 2015-06-07 10:28:45 -0400
Served asset /default.js - 404 Not Found (0ms)

ActionController::RoutingError (No route matches [GET] "/assets/default.js"):


Rendered C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.0ms)


Started GET "/stylesheets/skeleton.css" for 127.0.0.1 at 2015-06-07 10:28:45 -0400

ActionController::RoutingError (No route matches [GET] "/stylesheets/skeleton.css"):


Rendered C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.0ms)


Started GET "/stylesheets/base.css" for 127.0.0.1 at 2015-06-07 10:28:45 -0400

ActionController::RoutingError (No route matches [GET] "/stylesheets/base.css"):


Rendered C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.0ms)


Started GET "/javascripts/tabs.js" for 127.0.0.1 at 2015-06-07 10:28:45 -0400

ActionController::RoutingError (No route matches [GET] "/javascripts/tabs.js"):


Rendered C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.0ms)

1 个答案:

答案 0 :(得分:0)

这对我有用,这个答案属于"编码上瘾"

在您的config / application.rb中,您可能需要在此行中添加特定文件:config.assets.precompile + =%w(base。,skeleton。 ... ..)