Displaying 20 results from an estimated 30000 matches similar to: "Bug in ActiveRecord::Dirty (2.1)"
2009 Nov 30
6
rails 2.2.3 dirty.rb field_changed? method throwing arg error on creating an obj
I have a new model I''ve just built. It''s associated with another model
via has_many. I''m trying to create one of these obj''s for the first
time and I keep getting an Argument Error as follows:
ArgumentError (wrong number of arguments (3 for 0)):
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/
active_record/dirty.rb:135:in `field_changed?''
2009 May 05
3
Oracle-JRuby error
I am trying to migrate from RoR/MYSql to JRoR/Oracle. I am using Active
Record JDBC to talk to the database. The Migration process to create and
populate the database tables has been painful. My latest issue is the
method new_date is undefined in the JDBC adapter. I have the following
gems installed:
*** LOCAL GEMS ***
actionmailer (2.2.2)
actionpack (2.2.2)
activerecord (2.2.2)
2009 Feb 02
9
ActiveRecord Unexplainable SystemStackError - Only in WEBrick
This SystemStackError is driving me crazy. It only takes place when
testing with WEBrick - I can''t reproduce it with any tests. It is
caused by calling the "missing" id method (base.rb:2435) on my
ActiveRecord class.
WEBrick and my tests are running as the same user, with a `ulimit -s`
of 10240. Plus the query works sometimes so I don''t think this
matters.
2006 Mar 04
2
Declaring ActiveRecord observers
Hello
I''m using the ''act_as_authenticated'' plugin to implement a small and
simple authentication system in my app. Everything is working just
fine and the world is a better place to live in. The plugin creates a
ActiveRecord observer in order to send the newly registered user a
confirmation e-mail.
Per the API docs [1], one should declare the observer in the
2006 Jun 13
6
Dead horse: validates_associated
Regarding validates_associated...
Let''s say I have:
article belongs_to author
But for whatever reason, I want an article to also be written
anonymously and therefore not require an author. Then I have:
Article:
belongs_to :author
validates_associated :author
But I DON''T have validates_presence_of. What I want to do is validate
that an author is valid --if it is
2013 Nov 09
1
ActiveRecord return normal?
Hi Everyone,
I''m totally brand new to RoR. I''m really starting to love coding more now
that I''ve found RoR. I have what might be a dumb question, but I''m curious
to know this.
Is it normal to get this result:
In the Beginning Rails 4 book
I''m following this step:
irb(main):097:0> article.location = "Toronto, ON"
Here''s
2006 Jul 28
2
Problems connecting to remote mysql db
Hi,
I am having a problem connecting to a remote mysql db and I can''t
figure out what the problem is. When I try to connect I get the error:
getaddrinfo: no address associated with hostname.
I have looked all over for clues as to what that means but I haven''t
been able to find anything that helps. I have no problems connecting
to the database with php and with the mysql query
2007 May 10
0
Counterintuitive behavior in ActiveRecord I was implementing dirty checking for an application, and I found something that is a little counterintuitive. Let me start with a quick quiz: bob=User.find(1) alice=User.find(2) trip=Trip.new trip.driver=bob old_
I was implementing dirty checking for an application, and I found
something that is a little counterintuitive. Let me start with a
quick quiz:
bob=User.find(1)
alice=User.find(2)
trip=Trip.new
trip.driver=bob
old_driver=trip.driver
trip.driver=alice
In this example, who is old_driver? If you guessed Alice, you''re right.
Inside associations.rb, the mutator is defined as:
2013 Oct 23
0
Error: allocator undefined for Proc
I had this problem all of a sudden, just changed some puppet classes in my
modules, but no particular stuff or no error in the catalog creation.
Env :
Puppet master version 3.2.0-rc1
Centos kernel 2.6.32-279.11.1.el6.x86_64
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
Info: Caching catalog for jbossvdbmaster.prod.italy.cloudlabcsi.eu
Debug: Searched for resources in 0.01 seconds
Debug:
2007 Feb 19
0
Invalid SQL generated with PostgreSQL 8.2.3
Hey,
Using Ruby 1.8.5, postgres-pr-0.4.0, activerecord-1.15.2, Rails 1.2.2
and PostgreSQL 8.2.3. I''m following the O''Reilly book "Ruby on
Rails", so you can tell I know precious little of what I''m doing ;-)
Well, I''ve created some models, and was working through examples, and
executed the following from a console:
>> show = Slideshow.find 1
2006 Mar 25
0
[Sentry]-before_validation(model) not working for crypted-attribute?
I am still trying to get sentry working to encrypt a couple of
attributes in the model. One of them is a password field and the other
ssn#.
I have crypted_password and crypted_ssn in the db.
In addition, I also have validates_uniqueness_of :ssn
Here is the problem... I get the error
MysqlError: Unknown column ''ssn'' in ''where clause'': SELECT * FROM
students
2006 Feb 15
0
MySql adapter error
Most likely due to something I misconfigured and/or broke when trying to get
the new polymorphic acts_as_taggable to work...In short, after installing
that gem and then trying to run gem install mysql on my windows server, I''ve
been getting this weird error on every page I try to hit.
If anyone give give me any insight into how I messed this up or how to fix,
it would be much
2006 Feb 21
0
Rails edge breaks my app
I set my app on the Rails edge yesterday via rake freeze_edge and that broke
my app. If I take the ..\vendor\rails folder out and restart the server
(webrick), it works fine. I don''t get any errors. But if I re-add the
..\vendor\rails folder I get errors when accessing any views that have
pagination. Is this a known issue or problem? This is the error:
ActiveRecord::StatementInvalid in
2010 Feb 12
1
Why does config.gem mess up migration?
I was working this morning, trying to clean up my project and I did
something that sent migrations to hell-in-a-hand-basket.
I tried to run rake db:migrate --trace I got the following error msg:
(in /Users/richardmartin/NetBeansProjects/ReTrace)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Mysql::Error: Table
2006 Jan 22
6
Destructive behavior with link_to, button_to, :post=>true
Hello-
I would like to know what the suggested practice is for having multiple
submit buttons on a relatively complicated input page.
Let''s use the example of a Contact. There is lots of info there,
including name, address, phone number. There is also a list of "contact
associations" which can be modified on the same page.
Ideally, the user could have one
2006 Mar 21
5
Encrypting source / application licensing
Hey folks-
If I wanted to distribute my code to users that would run the code on
their own machine, how could I go about encrypting the source to run on
a user''s machine?
PHP has the Zend Encoder among others, I believe. Is there anything
similar for Ruby?
Jake
--
Posted via http://www.ruby-forum.com/.
2005 Dec 19
8
Simply Ruby question: "zerofill"
Hi there-
What''s the easiest/most efficient way to perform a zerofill in Ruby?
i.e. Given the value ''val'', I would like to do something like:
val = 43
puts val.zerofill(8)
---> "00000043"
gsub? sprintf of some sort?
Jake
--
Posted via http://www.ruby-forum.com/.
2005 Nov 26
4
activerecord rake test_mysql
Hi (I''m resubmitting this because
First question: This is the rails dev list, correct?
I''d like to submit a patch and am following the steps on this page:
http://dev.rubyonrails.org/
Here''s what I did (using mysql 5.0.15-nt):
created 2 databases:
activerecord_unittest
activerecord_unittest2
created 1 user: rails (giving all priveleges to both databases)
ran
2006 Mar 31
1
Ruby 1.8.4 upgrade screws up ActiveRecord
Okay, so I upgraded to Rails 1.1 on my Windows development machine and
everything worked fine. Then I went to upgrade to Ruby 1.8.4 from
1.8.2, launched WEBrick and browsed to 127.0.0.1:3000 and here''s what I
get:
Errno::EBADF in Front#index
Bad file descriptor - connect(2)
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/vendor/mysql.rb:108:in
2006 Nov 04
0
ActiveRecord, insert and not auto-incremented primary keys...
Hi,
After playing while with ActiveRecord, I''m surprised it isn''t easier to insert data into a table whose primary key is not auto-incremented by the database server.
The following code...
---------------------------------------
-- MySQL database "test"
---------------------------------------
CREATE TABLE gardens
(
code integer NOT NULL,
name