Nico
Nico

Reputation: 931

Rails 3.1 Asset Pipeline doesn't work for me

I'm upgrading a Rails 2.5 app to Rails 3.1 rc4 and I'm getting tons of these kind of errors in development, related to the asset pipeline:

cache: [GET /assets/application-272985f6b5b17a3aeb1b84a6a376e225.css] miss, store
2011-07-06 16:03:56 +0300: Read error: #<NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each>
gems/ruby-1.9.2-p0/gems/rack-1.3.0/lib/rack/handler/mongrel.rb:90:in `process'
gems/ruby-1.9.2-p0/gems/mongrel-1.2.0.pre2/lib/mongrel.rb:165:in `block in process_client'
gems/ruby-1.9.2-p0/gems/mongrel-1.2.0.pre2/lib/mongrel.rb:164:in `each'
gems/ruby-1.9.2-p0/gems/mongrel-1.2.0.pre2/lib/mongrel.rb:164:in `process_client'
gems/ruby-1.9.2-p0/gems/mongrel-1.2.0.pre2/lib/mongrel.rb:291:in `block (2 levels) in run'

Basically here the request for the application.css returns an empty body.

First I thought it might be a server issue, so I switched to webrick, but that didn't help.

Help is much appreciated. ;-)

Nico

Upvotes: 1

Views: 1318

Answers (3)

mvj3
mvj3

Reputation: 21

I have the same error, because change the default memcached store to dalli.

see https://gist.github.com/1625476

Upvotes: 0

Ian Yang
Ian Yang

Reputation: 1406

I met the same error. But the cause was that I set cache store to redis but I forgot to start redis server.

Upvotes: 5

Nico
Nico

Reputation: 931

Okay, not sure what the problem was, but I got rid of the issue by switching to thin as a webserver. The problem occurred with both webrick and mongrel.

Upvotes: 0

Related Questions