Displaying 20 results from an estimated 10000 matches similar to: "Wierd to_a issue..."
2007 Jan 10
3
ActiveRecord Error?
We spent a big chunk of yesterday hunting down a strange bug in one of
our rails apps and created a test project to try out different theories
on what was going on. The result so far is a very small test case app
that perfectly reproduces the problem. The question is, is there
anything *wrong* with what we''re doing here, or is it a problem with
ActiveRecord? We''re on rails
2006 Nov 20
5
RMagick load problems?
I have a page (model: daily_progress_chart) that uses RMagick and
ImageMagick to create a chart using RVG. A few days ago (after some
updates to Rails), this chart stopped working on both my development
machine (MacBook Pro) and the production server (Gentoo Linux). I get
the following error messages. I am totally lost, but I assume that there
is a problem with RMagick. Any ideas anyone?
On
2006 May 20
1
acts_as_paranoid overrides ActiveRecord::Base??
Guys,
I am trying to figure out what exactly does this line do at the end of
"acts_as_paranoid" plugin?
ActiveRecord::Base.send :include, Caboose::Acts::Paranoid::ActiveRecord
My problem: I have some classes that I use acts_as_paranoid, and others
with tagging support. Classes declared as taggable, throw error, which
appears to be in the acts_as_paranoid version of the
2006 Mar 27
2
:through and STI
Hi,
I''m trying to use :through and STI using the trunk version of Rails, but
I get the following error see bottom of this msg[1]
here are my classes.
class Player < ActiveRecord::Base
end
class Ladder < ActiveRecord::Base
has_many :subscriptions
has_many :players, :through => :subscriptions
end
class SingleLadder < Ladder
end
class Subscription <
2007 Aug 15
2
has_many :through ... What am I missing?
class Ladder < ActiveRecord::Base
has_many :players
has_many :users, :through => :players
end
class Player < ActiveRecord::Base
belongs_to :users
belongs_to :ladders
end
class User < ActiveRecord::Base
has_many :players
has_many :ladders, :through => :players
end
When I try the following code (on the console) I get an error:
@ladder = Ladder.find(1)
@ladder.users
I
2006 Apr 16
8
"Cannot convert String to Integer" after using association
So, I''ve written a partial that does some stuff with a given instance of
my class "entity". Entity is ActiveRecord. I''m able to retrieve all
sorts of data from an @entity, until I do something like:
<% for @attribute in @entity.attributes %>
<div id="attribute_<%= @attribute.id %>">
<%= render(:partial =>
2013 Mar 28
1
undefined method 'sanitize_limit' for #<ActiveRecord::Relation:0x2aaaad35d720>
I am trying to upgrate rails from 3.0 to 3.1, while updating rails version
I am getting following error
rake aborted!
undefined method `sanitize_limit'' for
#<ActiveRecord::Relation:0x2aaaad35d720>
/some_package/lib/ruby/gems/1.8/gems/activerecord-3.1.12/lib/active_record/relation.rb:460:in
`method_missing''
2010 Aug 30
1
taskomatic.rb : set_vm_vnc_port
Hi,
Does somebody know what is the purpose of this line in taskomatic.rb :
set_vm_vnc_port(db_vm, result.description) unless result.status != 0
We removed it to avoid 2 errors in taskomatic.log when a vm is launched :
ERROR Mon Aug 30 15:23:00 +0000 2010 (26416) Task action processing failed:
ActiveRecord::RecordInvalid: Validation failed: Vnc port must be greater than
or equal to 0
ERROR
2007 May 28
1
upload_column problems on post after validation error
Hi to all the crew !
I''ve a little (big ?) problem.
I''m using upload_column plugin, it works very well but it throws an
exception when I try to repost the form after a validation error.
Here some details:
Model: (hostel.rb)
HOSTEL_PHOTO_DIR = Proc.new {|inst, attr| "hostel/#{inst.id}"}
HOSTEL_PHOTO_THUMB = "100x100"
HOSTEL_PHOTO_NORMAL =
2008 May 16
0
attachment_fu and/or rmagick on osx -- weird error
One of our developers is getting a weird error from attachment_fu and/or
rmagick on OSX. And even weirder because he''s used attachment_fu and
rmagick on other projects without difficulty. This all works fine on
debian/ubuntu. See the stack trace below. Any suggestions?
Btw, the code that''s blowing up is retrieving the attachment_fu info.
The presence of image_science in
2007 Jun 28
1
DRb server crashing
I''m having a problem where the DRb server seems to be disappearing
(crashing?) and I don''t know how to track down the cause or work around
the problem.
Unfortunately I haven''t found a way to reproduce the problem, but it
seems to happen fairly often (maybe once a day). Other then that ferret
seems to be working well.
I can''t seem to find any trace of the
2009 Nov 17
5
has_many :through and foo.bars.include?
hallo everybody,
i already googled the following problem, but there are so many
questions regarding "has_many :through", that i just couldn''t find
what i was looking for. so, i''m really sorry if this has been asked
before. if so, just drop me the link.
i have a has_many :through relationship similar to the following
example:
class Group < ActiveRecord::Base
2006 Dec 22
2
Relating Namespaced Models
I am dealing with a large project. I use a lot of STI and therfore have
a lot of models. I''d like to use namespaces to help organize my models
but am having trouble getting started.
I have a base model Term::Base located in /app/models/term/base.rb:
class Term::Base < ActiveRecord::Base
set_table_name "terms"
end
I have a non-namespaced client model:
class Client <
2007 Jul 04
5
stack level too deep
Hi,
I have a SystemStackError. Here is the stack (sorry if it''s a little
long) :
app/models/line_item.rb:14:in `product''
app/models/line_item.rb:14:in `product''
app/controllers/store_controller.rb:188:in `redirect_to_paypal''
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/associations/association_proxy
.rb:123:in `each''
2010 Mar 05
0
NoMethodError (undefined method `match' for nil:NilClass):
Hi,
I have a redmine server with Ruby 1.8 running along with Webrick. When I
try to access any docs on the server using web interface I get the
following message.
Internal error
An error occurred on the page you are trying to access.
If you continue to experience the problems please contact the
administrator.
I looked to production.log i found the following messages. I really need
your help.
2006 Aug 08
1
File upload into Mysql (using lighttpd) problem
Hello All,
I''ve run into a snag. (I apologize in advance. I''m not very good at
system administration.)
I''m building an app that allows users to upload files. Up until now I
have been storing the files on the file system, but tonight I decided to
change the app so the files are stored in the database as a longblob.
I thought everything was working great, until I
2006 Apr 04
6
Oracle Problem. Maybe driver
EVerything runs ok on my local machine but when i copy my app to our
solaris server everything is fine until i try updating/inserting
something into the DB.
This is the error message :
wrong number of arguments (1 for 0)
RAILS_ROOT: config/..
Application Trace | Framework Trace | Full Trace
2009 Sep 03
7
Strange NoMethodErrors in production mode, I just don't know what to do.
Hi,
thanks for reading. Since hours, I am facing a problem and it seems
that I am not able to solve it.
Let''s say, I''ve got a model called "AnnotationType". This model has
got a method called "foobar(x)". It''s just so simple. I can access
this method in my unit tests, in the console (all modes), but if I
start the server in production mode and try
2008 May 12
3
Enumeration sum
Any idees why I can do this:
@sum = @selected.inject(0) { |sum, player| sum + player.value }
but not this:
@sum = @selected.sum { |player| player.value }
@sum = @selected.sum(&:value)
The last two give me following error:
wrong number of arguments (1 for 2)
/Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/association_collection.rb:164:in
`calculate''
2005 Jun 02
0
Don't use an attribute/column that matches a Kernel method (including 'y')
I''ve found a problem, and it might be bug in Ruby itself, but I''m not sure.
Say I''ve got a model object (Point) whose table contains column "y". Model
Circle has_one Point center. When I load a Center from the database, I"m
unable to get the actual value for y. Here is a summary of what I see
when I debug into Circle.center.y:
Stepping into y(), I