Rails production environment breaks with loop

You have a rails application (3.0.9) using HAML, the local development server is working fine. But when I start the s -e production rails, my page gives this error:

NoMethodError: undefined method `+@' for #<String:0x00000006331098>

The error says that it is on this line (from a view written in HAML):

%tr{:class=> cycle("even","odd")}

I find nothing about why this is happening. Please, help.

+5
source share
1 answer

Does the method use cycleany string concatenation?

I discovered this error recently while checking the code.

The code was something like this:

anObject.instance_method +string_var

instance_methodreturned the string that should have been added with the string value present in the variable string_var.

anObject.instance_method + string_var # +

unary + string_var, unary + String. .

, unary + def +@, " +@ ".

: https://gist.github.com/1145457

cycle ( , ), , .

, .

+1

All Articles