# Fixnum problem

**URL:** <https://www.ruby-forum.com/t/fixnum-problem/197125>\
**Category:** Engines\
**Created:** [March 7, 2010, 7:09pm UTC](https://www.ruby-forum.com/t/fixnum-problem/197125 "2010-03-07T19:09:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![manish\_belsare](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7993a0/32.png) [@manish\_belsare](https://www.ruby-forum.com/u/manish_belsare)\
**Post date:** [March 7, 2010, 7:09pm UTC](https://www.ruby-forum.com/t/fixnum-problem/197125/1 "2010-03-07T19:09:10Z")

</div>

Sir can i know what is the meaning of the phrase ‘comparison of Fixnum  
with nil failed’

I want to pass two parameters to a method in a model file…  
bt wen i pass an integer then it gives the above error…  
Please help…

---

<div class="post-metadata">

**Author:** ![manish\_belsare](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7993a0/32.png) [@manish\_belsare](https://www.ruby-forum.com/u/manish_belsare)\
**Post date:** [March 7, 2010, 8:02pm UTC](https://www.ruby-forum.com/t/fixnum-problem/197125/2 "2010-03-07T20:02:26Z")

</div>

Quoting manish belsare [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Sir can i know what is the meaning of the phrase ‘comparison of Fixnum  
> with nil failed’
> 
> I want to pass two parameters to a method in a model file…  
> bt wen i pass an integer then it gives the above error…  
> Please help…

Sounds to me like you have nothing (nil) when you expect something  
(perhaps the integer?). Does your method then try to do some sort of  
comparison, for example:  
if myparam \> 3

If myparam is nil for some reason, you might get that error. Try  
logging your input just after you get into the method. You may also  
want to log its class (e.g. myparam.class).

---

<div class="post-metadata">

**Author:** ![manish\_belsare](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7993a0/32.png) [@manish\_belsare](https://www.ruby-forum.com/u/manish_belsare)\
**Post date:** [March 7, 2010, 8:12pm UTC](https://www.ruby-forum.com/t/fixnum-problem/197125/3 "2010-03-07T20:12:11Z")

</div>

sir even if i try to call a method with a different name in the same  
Model file than also i get the same Finxum problem…

I want to know what does that error mean?

---

<div class="post-metadata">

**Author:** ![manish\_belsare](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7993a0/32.png) [@manish\_belsare](https://www.ruby-forum.com/u/manish_belsare)\
**Post date:** [March 7, 2010, 9:42pm UTC](https://www.ruby-forum.com/t/fixnum-problem/197125/4 "2010-03-07T21:42:34Z")

</div>

Quoting Manish B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> sir even if i try to call a method with a different name in the same  
> Model file than also i get the same Finxum problem…
> 
> I want to know what does that error mean?

This really isn’t an Engines related question. You should probably be  
be asking this on the general Rails forum;  
removed\_email\_address@domain.invalid

When you post there, please include the code that is erroring and the  
full error message - including stack trace. Without seeing the actual  
code, it is nearly impossible to determain the cause of the error in  
enough detail to explain it.

---

<div class="post-metadata">

**Author:** ![manish\_belsare](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7993a0/32.png) [@manish\_belsare](https://www.ruby-forum.com/u/manish_belsare)\
**Post date:** [April 14, 2011, 9:01am UTC](https://www.ruby-forum.com/t/fixnum-problem/197125/5 "2011-04-14T09:01:22Z")

</div>

It is hard to understand it.

---

<div class="post-metadata">

**Author:** ![manish\_belsare](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7993a0/32.png) [@manish\_belsare](https://www.ruby-forum.com/u/manish_belsare)\
**Post date:** [September 28, 2011, 3:04am UTC](https://www.ruby-forum.com/t/fixnum-problem/197125/6 "2011-09-28T03:04:56Z")

</div>

add code on post here.
