I have a working application and my code works on my laptop, but when I
try it on our production server I come up with this error, but for the
life of me I can’t figure out why it is being thrown on one machine and
not the other.
NoMethodError: undefined method `size’ for nil:NilClass
Unfortunately I don’t remember it. I just remember that I applied a
patch in one of the file of gem.
Apply below patch in var/lib/gems/1.8/gems/htmldoc-0.2.0/lib/htmldoc.rb
file.
@result[:output] = result
result.split("\n").each do |line|
line.strip! (patch)
case line
when /^BYTES: (\d+)/ @result[:bytes] = $1.to_i
Patch file is attached.
Let me know if this is worked or not.
Thanks
Brijesh S.
Ash F. wrote:
Did you ever figure out this problem?
I have a working application and my code works on my laptop, but when I
try it on our production server I come up with this error, but for the
life of me I can’t figure out why it is being thrown on one machine and
not the other.
NoMethodError: undefined method `size’ for nil:NilClass
This unfortunatly wasn’t the problem, but I did manage to figure out I
only got it when running through mod_rails. We just deployed the app to
another server that was rebuilt from scratch and it is working now, so
no idea what the actual cause was.
Thanks for the help.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.