Displaying 20 results from an estimated 9000 matches similar to: "Undefined method "updated?""
2006 Aug 25
6
End-of-File Error occured at <except.c>:103 in xpop_context
Hi, I get this when searching or adding a new record. I am using today''s
version of trunk and gem ferret 0.10.0
any ideas? thanks!
EOFError in DvbesController#new
End-of-File Error occured at <except.c>:103 in xpop_context
Error occured in store.c:197 - is_refill
current pos = 0, file length = 182
RAILS_ROOT: script/../config/..
Application Trace | Framework Trace | Full
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 Aug 15
2
has_many + finder_sql & :include
Hello,
In a model I have:
has_many :things, :finder_sql => '' select * from other_things '' +
'' where id = #{id} ''
When I do MyClass.find(:all, :include => :things) I get a weird error:
from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract_adapter.rb:120:in
2006 Aug 16
6
Newbie-Question
Hi.
I''ve just started using Ruby on Rails.
Now I''ve got my first problem.
I generated a new migration ''add_price'' and get the message:
2006 Dec 14
3
Problem with ActiveRecord and Associations
Hi,
I''m having what I believe to be a typecast problem with ActiveRecord and
Associations. In the code below, I need to flag a contact record for
deletion if the contact doesn''t have any addresses or books records:
sql = "select id, delete_flag from contacts where id = #{params[:id]}"
contact = Contact.find_by_sql(sql)
if (contact[0].addresses.count +
2006 Dec 04
7
I need help to connect Postgres and Ruby on Rails Please.
Hello to everyone, I have a problem that is giving me a headache, and
trying to do a project in Ruby on Rails and I need to connect with a
Data Base that is en Postgres, the truth is that I didn’t think that it
was so hard to connect a DB with postgres because I was working with
Msyql and everything was easy. This are the thinks that I have install
in my computer.
1. Debian GNU/Linux, kernel
2006 Mar 31
7
problem with habtm conditions in pagination
Hello list,
I''ve had this problem for two days now. Perhaps someone here would
care to comment on it. I''d be REALLY appreciative if that''d be the case.
Basically, it''s outlined at this paste: http://rafb.net/paste/results/
kXQSHZ83.html
But I''ll paste it here, too.
The main problem is in the customers/list action. The problem is with
this line:
2006 Sep 15
2
Caching::Sweeper Access to Controller
Hello,
I''m running Mongrel 0.3.13.3, cluster 0.2.0, and Rails 1.1.6 and I
have a problem with a sweeper not having access to the controller
instance.
NoMethodError (undefined method `session'' for nil:NilClass):
/app/models/audit_sweeper.rb:16:in `log''
/app/models/audit_sweeper.rb:9:in `after_update''
2006 Sep 13
1
Eager loading with acts_as_tree
So I have a model that acts_as_tree and I run a method on a collection
of all of these records. This method walks the tree and fetches the
parent/children, etc. This results in many, many duplicate SQL queries
to be executed. Is there a way to eagerly load all of these models?
Something along the lines of:
Model.find(:all, :include => [:children, :parent])
If I execute the above statement, I
2007 Sep 05
8
Hi..Guys new plugin again
Hi..
Guys new plugin again
Foreign Key Associations is a plugin that automatically creates
associations based on foreign-keys. The associations are created at
runtime-ie. as your ActiveRecord models are loaded-so they will always
be up-to-date.
For example, given a foreign-key from a customer_id column in an
orders table to an id column in a customers table, the plugin
creates:
2006 Sep 15
2
unable to figure out how to get backgroundrb.yml to be used when starting backgroundrb
i ran rake backgroundrb:setup and modified the default
config/backgroundrb.yml file as:
---
port: "22223"
timer_sleep: 60
load_rails: true
environment: production
host: localhost
database_yml: config/database.yml
acl:
deny: all
allow: localhost 127.0.0.1
order: deny,allow
and my database.yml
production:
adapter: mysql
database: chip2_production
username: xxxxx
password:
2006 Aug 12
2
Extend ActiveRecord::Base
Hi,
I want to exten ActiveRecord::Base with own methods:
class Stock < ActiveRecord::Base
def compare_own
...
end
end
But call Stock.compare_own fails:
NoMethodError: undefined method `compare_own'' for Calendar:Class
/var/lib/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1129:in
`method_missing''
But why?
I want to use only ActiveRecord from RoR, I
2006 Nov 04
2
strange errors in dev.log and webserver log
Hi guys,
I have encountered a strange error in one of my applications.
The details are the following:
The application is a very simple one, I have one model, Cards, it has
some pretty basic stuff, some after_save methods for saving uploaded
files to their places.
I have an UI where I can manage the Card records, with the default
methods, including ''edit''
cards_controller.rb:
2005 Nov 20
1
mySQL 5.0 upgrade - incompatible DateTime format?
I''ve upgraded to mySQL 5.0, and it''s gone pretty smoothly except that on
DateTime.now doesn''t seem to return a value that mySQL likes any more,
as seen in the following exception:
Incorrect datetime value: ''2005-11-20T15:33:12-0800'' for column ''logged_at'' at row 1: UPDATE notes SET `due_on` = ''2005-11-20'',
2006 Aug 17
3
Ferret locks up when adding items to an index
I''m running Ferret 0.9.5 on a MacBook Pro (OS X 10.4.7) under
Locomotive 2.0.7.
I have a problem where Ferret is hanging when I try to add items to
the index. It doesn''t happen with every object that''s being indexed,
and I''m not sure what the objects in question have in common (they
are not all instances of the same ActiveRecord object). The process
2006 Oct 11
3
Basic Relationship Problem
I''m trying to do a basic relationship and it''s not working the way it
should. The data model is obviously a test database as the fields are
minimal.
In irb I do the following:
>> user = User.create(:name => "shawn")
=> #<User:0x259ceac @errors=#<ActiveRecord::Errors:0x259c3a8
@errors={}, @base=#<User:0x259ceac ...>>,
2006 Sep 20
3
Unit and Functional Tests Bombing with Ferret
Hello,
I am currently using ferret 0.9.5 and acts_as_ferret 0.2.3 on windows XP
All my unit and functions test that used to work before I installed
ferret are erroring out. My index is on a model name Post, and it looks
like all tests that contains methods which does CRUD to the Post model
bombs out.
Is there anything special I need to do before running unit and
functional test?
Thanks
2006 Sep 25
8
mongrel.pid disappearing
Hi to everybody,
This my first post on the list.
I''m a newby of mongrel & rails, I''ve deployed my first project and
everything seems to work fine, the only problem I have is the following:
After about 1 or 2 days of the mongrel_rails daemon running the
mongrel.pid in the log directory disappears, the mongrel process is
still there running
but doesn''t respond
2006 Sep 07
1
gem mysql buggy on Win32
Hi,
Just running a simple unit test and trying to save an object gives me
this error.
test_validations(FriendTest):
NoMethodError: undefined method `each'' for #<Mysql:0x38f60d0>
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_a
dapter.rb:292:in `columns''
....
....
Rails 1.1.6
mysql 5
mysql gem 2.71
After I
2005 Dec 07
3
ActiveRecord::Observer problem
Hi all,
I have a problem with an observer. I have a simple observer...
class ActivityObserver < ActiveRecord::Observer
observe Customer
def after_create(model)
bind_params(model)
@al.action = "create"
@al.save
logger "#{model.id} : created"
end
private
def bind_params(model)
@al = ActivityLog.new
@al.user_id = User.current.id