Puzzling behavior
Was debugging some code today that was working on a windows box, but was not working in a Linux box.
After some debugging and placing of puts statements in the code figured that the issue was with the
bit. It should have been
But still not sure why this worked on a windows box and not a linux box !!
On the linux box, draw_roads would always look for a draw_roads.rhtml template and go ahead with the execution. Whereas in a Windows box, the check would be performed and accordingly a render of "No Routes to Show" would happen or draw_roads.rhtml would have gotten rendered.
class MapController
model :Roads
def draw_roads
render :text => "No Routes to show" if no_roads
end
end
After some debugging and placing of puts statements in the code figured that the issue was with the
model :Roads
bit. It should have been
model :roads
But still not sure why this worked on a windows box and not a linux box !!
1 Comments:
It is probably because the windows box is not case sensitive, but linux is. So Roads.rb on windows will match roads.rb, whereas on linux they won't match.
Great to see you guys blogging this stuff!
Post a Comment
<< Home