Can't convert nil to string error: how to solve?

Hi

What would you say are the top reasons for getting this error? I
don’t seem to have any of the example cases I’ve found searching with
Google, and trying to trace through the stack is not giving me any
clues. Any tips you have for me?

Thanks in advance.

jlb

jlesleyball wrote:

Hi

What would you say are the top reasons for getting this error? I
don’t seem to have any of the example cases I’ve found searching with
Google, and trying to trace through the stack is not giving me any
clues. Any tips you have for me?

Thanks in advance.

jlb

typically caused by
good_var + ‘abc’ +
var_that_should_be_good_but_is_currently_nil_for_some_unexpected_reason

you prolly want to debug why that var is currently nil for some reason

On Thu, 2008-04-17 at 00:45 +0200, Roger P. wrote:

jlb

typically caused by
good_var + ‘abc’ +
var_that_should_be_good_but_is_currently_nil_for_some_unexpected_reason

you prolly want to debug why that var is currently nil for some reason


but it may be useful to note that

var_that_should_be_good_but_is_currently_nil_for_some_reason.to_s = ‘’
instead of nil

Craig

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs