Greg's personal journal ( ͡° ͜ʖ ͡°)

Sass undefined method '[]'

Working on Rails upgrade to versions 4.2 recently, I came across the following error message:

NoMethodError undefined method '[]' for "image":Sass::Script::Value::String

Backtrace pointed at nonrelevant line, so I had no idea where to start searching. Fortunately I found the solution at

It seems like the issue was my asset-url method using old two-argument call:

asset-url('payments/cards_new.png', image)

I removed the last argument according to depreciation notice and it worked like charm.