Cannot precompile all files (app\assets) in rails application though rake assets:precompile

253 views Asked by At

I have a rails application and try to Run it to my local server on Win2012 now right.

https://github.com/carloscoca/loccasions

I tried to precompile all Files in app\assets though the command rake assets:precompile and no errors came out.

However, I ran the website though localhost, but look incomplete it need some files and I checked the log file. (Some files was precompile a others not, in the manifest file is the same).

I tried config.assets.compile = true, not result and some configuration too, no luck

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

There are 1 answers

0
Victor Hugo Terceros On BEST ANSWER

This worked for me, this answer belongs to "coded addicted"

In your config/application.rb you may need to add the specific files in this line: config.assets.precompile += %w(base., skeleton. .....)