8
Problem
I have a Rails 3.0.4 app which I upgrade to 3.1.4 following instructions from Railscast video: "Upgrading to rails 3.1".
Now I have problems with assets because they are not resolved, giving messages in server log like this:
Started GET "/assets/application.css" for 127.0.0.1 at 2012-04-08 03:57:13 -0500
Served asset /application.css - 404 Not Found (15ms)
ActionController::RoutingError (No route matches [GET] "/assets/application.css"):
Rendered /usr/local/rvm/gems/ruby-1.9.2-p318/gems/actionpack-3.1.4/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (14.3ms)
Started GET "/assets/application.js" for 127.0.0.1 at 2012-04-08 03:57:13 -0500
Served asset /application.js - 404 Not Found (35ms)
ActionController::RoutingError (No route matches [GET] "/assets/application.js"):
These files are in assets directory:
$ ls app/assets/*/application*
app/assets/javascripts/application.js app/assets/stylesheets/application.css
and contains this:
$ cat app/assets/javascripts/application.js
//= require jquery
//= require jquery_ujs
//= require_self
//= require_tree .
$ cat app/assets/stylesheets/application.css
/*
*= require_self
*= require_tree .
*/
I suppose everything is configured. Here I put some chunks of files:
Gemfile, contains assets gems required:group :assets do gem 'sass-rails', '~> 3.1.3' gem 'coffee-rails', '~> 3.1.0' gem 'uglifier' endapplication.rb, has assets enabled:config.assets.enabled = true config.assets.version = '1.0'development.rb:config.assets.compress = false config.assets.debug = t