Displaying 20 results from an estimated 3000 matches similar to: "tests problem - NoMethodError: private method `gsub' called for 117681882:Fixnum"
2008 Oct 08
2
private method `gsub' called for 2:Fixnum
RoR Error: “private method `gsub'' called for 2:Fixnum”
I am new to RoR and trying to complete “RailsSpace Social Networking”
example, all works fine until I have implemented cookies using
authorization_token, and start getting following error when trying to
login.
“private method `gsub'' called for 2:Fixnum”
I can make out that there is something related to String conversion
2010 Dec 08
1
NoMethodError: `bytesize' for 200:Fixnum (with Rails-3.0.3)
Thanks to Rails developer team.
I tried Rails3 along this guide:
Ruby on Rails Guides: Getting Started with Rails
http://edgeguides.rubyonrails.org/getting_started.html
and I met the problem described as following.
...Any ideas?
===========
Environment:
===========
$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin9.8.0]
$ rails -v
Rails 3.0.3
===========
Steps for reproduce:
2006 May 30
3
expected, got Fixnum problem.
Hi,
I was wondering if anybody knew what ''<some type> expected, got Fixnum''
means? My code looks like the following:
begin
anevent = Event.new
anevent.title = params["event"]["title"]
anevent = session[:user_id]
com = Community.find(params[:id])
com.events << anevent
rescue Exception => exc
...
end
But I get an
2006 Jan 19
3
-517611318:Fixnum ... WTF?
I''m getting occasional errors that look like:
Some method called for -517611318:Fixnum
The method is constantly changing, and this error happens on ~5% of
the page loads on my Mac Tiger development box. It''s happening on
Ruby 1.8.2, and 1.8.4 compiled from source. I haven''t seen it on my
Linux production boxes. I was wondering if anyone had seen this
before?
--
2007 Jul 18
1
How to use fixnum in RangeQuery?
As far as i know about the RangeQuery is that it need fixed-length
number in query options such as RangeQuery.new(:count, :>= => ''00'', :<=
=> ''99'').
But is there a mechanism to use a fixnum in the options instead of
filling the left with 0?
Regards.
--
Posted via http://www.ruby-forum.com/.
2009 Feb 02
4
AssociationTypeMismatch got Fixnum
I''m using rails 2.0.5 and mongrel.
I have a Page and a Source models.
class Source < ActiveRecord::Base
has_many :pages
end
class Page < ActiveRecord::Base
belongs_to :source
end
Basically I''m listing pages with their sources; In production and
development ( I use mongrel_cluster in the first and a single mongrel
on the second) I got this error:
2012 Feb 29
1
can't convert Fixnum into String in relativity
good day i read about relativity gem but when i try to use it and make
a test file and build it gives me an error
=test.rb=
<pre>
require ''relativity''
opens_at = DayTime.new(9) #=> 09:00:00
closes_at = DayTime.new(12,30) #=> 12:30:00
</pre>
<pre>
/home/start/.rvm/gems/ruby-1.9.2-p290/gems/relativity-0.0.8/lib/
relativity/day_time/new.rb:24:in
2006 Nov 28
2
(no subject)
I''m using wx_sugar 0.1.2 with wxruby2-preview 0.0.37 on OSX and am
coming up with a strange error when trying to create a SpinCtrl:
class DatePicker < Wx::Dialog
def initialize
super(nil, :title => "Pick a date...")
arrange_vertically(:padding => 5)
@month = Wx::SpinCtrl.new(self) # line 19
add(@month)
end
end
gives error:
2007 Dec 04
2
Bug: NoMethodError: private method `gsub'' called for nil:NilClass
Hi there.
I''m using RedCloth as part of a social network''s blog system.
I came across the following bug when an img tag with the src attribute
is inputted, and filter_html is set to true.
I have pasted the code sample below.
>> require ''RubyGems''
=> true
>> require ''RedCloth''
=> true
>>
2011 Aug 25
1
Devise + Forem: undefined method weeks on Fixnum
I''m getting the following message when trying to start Webrick or
console.
... devise-1.0.11/lib/devise.rb:89:in ''<module:Devise>'': undefined
method ''weeks'' for 2:Fixnum (NoMethodError)
After trying to upgrade my app to Rails 3.1 (edge) so that I may use the
Forem engine.
I''m under the impression this error is occurring because
2008 Oct 20
1
LC_VIRTUAL with Wx::ListCtrl
Wx::ListCtrl#set_item_count appears to be broken. If I pass it
anything but a Fixnum (is_a Integer), it crashes and says it needs a
"long" (which Fixnum should appease), but if I pass it a Fixnum it
crashes with "cannot convert nil into String."
Latest WxRuby. Windows Vista.
This makes using LC_VIRTUAL impossible.
-- Eric Will // xmpp:rakaur@malkier.net
2006 Jul 20
1
Override coulmn data type - urgent
Hi-
I have a BigInt (MySql) column type - RAILS treats it as FixNum, which
causes big problem for us since we need to store a 12+ number of digits.
How can I tell Rails to treat is as BigNum instead of FixNum?
thanks
thila
--
Posted via http://www.ruby-forum.com/.
2007 Feb 28
1
Rails 1.2 Bug (?): to_text_area_tag
Hi all,
I''m fairly new to rails and thus might be missing something here, but I
think I have found a but in ActionPack. If this is not the right place
to post this, please let me know where. I discovered this issue while
attempting to use the lastest edge version of ajax_scaffold (mooey, MUI,
whatever it''s going to be called). I kept getting the error:
private method
2006 May 08
3
operator overload on views
In my User auth scheme I have a userlevel. I''ve overloaded the User
class operators like this:
def >(item)
if item.class == "User"
self.userlevel > item.userlevel
else
self.userlevel > item
end
end
(other operators are overloaded in essentially the same way). As I
understand it, using the operator ">" inside the overloaded
2006 Jun 04
6
Activerecord relations.
I''ve got two tables set up - Things and Users where Users have many
things and Things belongs to Users.
They''re connected by Things.user_id => User.id and Things.updated_by_id
=> User.id both in the Things model using Belongs_to and custom foreign
key for one of them.
Problem is when I''ve got the updated_by_id belongs_to I can''t add Things
using
2008 Apr 07
5
Associations errors
undefined method `each'' for 0:Fixnum
at line
@school = School.find_by_title(params[:school_id].gsub(''-'', " "))
for team in @school.teams
........
end
@school does exist cause i tried with .find(:first) and it gave the
same error.
Also I''m getting
undefined method `reject'' for #<Game:0x24ca1c4>
From @home.game_ids = @game
2006 Mar 29
5
Database passwords with numbers
I have database password in my database.yml as "passw0rd" however when I
go to http://localhost:3000/rails/info/properties I get this error:
private method `gsub'' called for 1:Fixnum
But if I just use "password" for my password everything is ok.
Any ideas?
--
Posted via http://www.ruby-forum.com/.
2006 Jul 20
3
[OT Ruby] Displaying a binary ?
How to I display the binary equivalent of a number? I tried this:
b = 0b1101
puts b # returns decimal value ( 13 )
b.to_bn # generates "unable to convert FIXNUM to STRING.." error.
--
Best Regards,
-Larry
"Work, work, work...there is no satisfactory alternative."
--- E.Taft Benson
-------------- next part --------------
An HTML attachment was scrubbed...
2012 Feb 28
8
getting error:undefined method 'current'
hi all,
i am getting an error ''undefined method ''current'' for 852:Fixnum'', the
error coming for following line
<%if @expert_pagination.current.previous%>
<a href="#" class="darkgray1"
2006 Mar 31
4
Date magic?
Hi.
When I read Dave and Davids excellent book "Agile Web Development with
Rails" the first time, I was particularly impressed with the following
statement:
1.day.from_now
It was used in a test class to set the date of tomorrow dynamically. Since
it was enclosed in in ERb tags, I assumed this was a normal ruby statement,
but when I tried it in my irb, i get the following error: