similar to: validates* give me problems

Displaying 20 results from an estimated 6000 matches similar to: "validates* give me problems"

2006 Jan 13
1
validating without saving
i am trying to validate without saving use the valid? method on my object. however i keep getting the following error (that i reproduced in console) "NoMethodError for field" Any ideas ? thanks adam Loading development environment. >> p = Post.new => #<Post:0x407b6050 @attributes={"created_on"=>nil, "subcat"=>1, "cat"=>nil,
2006 Aug 09
1
Migrating a Field to External Model
I have a model Product with an attribute ''brand''. Currently it is a simple attribute, however, I am migrating it to a separate model Brand so that I can have other attributes with each brand. I created the the model and created and ran the migration to create the new table. So far so good. Then I created a separate migration to transfer the data. The up method
2006 Apr 28
2
validates* gives me problems
Hi, In Debian/testing (mysql-5.0.20, ruby1.8, rails 1.1.0) Im trying to follow up the fourdaysonrails tutorial, and when putting: validates_uniqueness_of :category, :message => "Already exists" in /myapplication/app/model/category.rb I get: NoMethodError in Categories#create undefined method `category'' for #<Article:0x407f6418> RAILS_ROOT:
2006 Jun 20
2
Problem with "can''t dump anonymous class Class"
I submitted this earlier, but the web forums went down and I''ve screwed up the thread, so I''m starting over. I''m trying to built a document upload system. The system has a main Document model with different subclasses for different types of documents. With the code below, if I attempt to create a Document, it works fine, but if I attempt to use one of the subclasses, I
2007 Aug 09
0
TypeError: $_ value need to be String (nil given)
Hello all, I am trying to run a unit test in a Rails project of mine (Rails 1.2.2, Ruby 1.8.4 (2005-12-24) [i486-linux]), and am running into the following error: 1) Error: test_pattern_splits(PatternSplitTest): TypeError: $_ value need to be String (nil given) /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ validations.rb:74:in `split''
2005 Feb 09
1
[DEFECT] ''validates_inclusion_of'' not working as expected (couldn''t post to Trac as it gave me an error)
Hello, I tried to post this as a bug on the trac site, but whenever I hit submit, I got the error message: --- Precondition Failed The precondition on the request for the URL /newticket evaluated to false. --- Anyway... Let''s say I have the following model classes: --- class Project < ActiveRecord::Base has_many :tasks end class Task < ActiveRecord::Base belongs_to
2005 Dec 16
0
ArgumentError on create
I have several validations applied to my model: class Quote < ActiveRecord::Base has_many :files validates_presence_of :title, :source, :quote, :message => "Missing Field Required" validates_length_of :title, :source, :maximum => 80, :message => "Maximum Length 80 characters" validates_inclusion_of :year, :in=>1911..2006, :message => "Year must be
2009 Jun 17
2
validates_uniqueness_of fails on STI in Rails 2.3.2
I''ve got something like this: class Position < ActiveRecord::Base end class CartItem < Position validates_uniqueness_of :product_id end When I try to save CartItem I get this error: ArgumentError: wrong number of arguments (1 for 2) from /home/joaz/.gem/ruby/1.8/gems/activerecord-2.3.2/lib/active_record/validations.rb:758:in `exists?'' from
2006 Mar 03
1
weird error with login engine
Any ideas what would cause the following exception (using the login engine): -------------------------------------- Full executation backtrace: -------------------------------------- [RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1697:in `execute_callstack_for_multiparameter_attributes'' [RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1677:in
2006 Jun 04
4
"can''t convert Magick::GravityType into Integer"
Am having trouble with file_column -- on certain crop operations, it says: A TypeError occurred in [controller]#[action]: can''t convert Magick::GravityType into Integer [RAILS_ROOT]/vendor/plugins/trunk/lib/magick_file_column.rb:90:in `crop'' Any advice? Here''s the backtrace: [RAILS_ROOT]/vendor/plugins/trunk/lib/magick_file_column.rb:90:in `crop''
2006 Mar 16
1
login_engine error
Hey All, I have been unsuccessful at getting the login_engine installed. I have used it before but since the last time I''ve used it I can''t get it to work correctly. I was wondering if someone could help out with the following error: undefined method `password_confirmation='' for #<User:0x2aaaad1421a0> Any Help? Thanks, Adam <<<<<<REST OF
2007 May 30
2
ActionView::TemplateError
Hi, I have a strange problem that only occurs on the production server. I''ve been banging my head for hours trying to figure it out with no success. Below is a copy of the error from the production log. ActionView::TemplateError (Expected /www/rails_apps/scanlan/current/ public/../config/../app/models/image.rb to define Image) on line #6 of app/views/admin/design/_record.rhtml: 3:
2012 Sep 18
2
undefined method `to_sym' for nil:NilClass
Hi all, I am trying to upgrade my rails 2 app to 3 and am getting this error when trying to login: NoMethodError in AuthenticateController#authenticate undefined method `to_sym'' for nil:NilClass The stack trace is: activerecord (3.2.2) lib/active_record/validations/uniqueness.rb:26:in `validate_each'' activemodel (3.2.2) lib/active_model/validator.rb:153:in
2009 Nov 13
3
Encoding::UTF_8 missing?
I''ve just done a fresh reinstall of OS X Snow Leopard on my mac, and I''m having all kinds of problems with Rails, but the latest problem has me stumped. Whenever I run rake db:seed to populate my database I hit the following error: ** Invoke db:seed (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:seed rake aborted! uninitialized constant
2006 Mar 15
0
Rails App Error with lighttpd
I have the same exact configuration on a dev machine and a production machine. When I put it on a different production machine, I get: #{RAILS_ROOT}/vendor/rails/railties/lib/fcgi_handler.rb:150:in `process_request'' #{RAILS_ROOT}/vendor/rails/railties/lib/fcgi_handler.rb:54:in `process!'' #{RAILS_ROOT}/vendor/rails/railties/lib/fcgi_handler.rb:53:in
2006 Aug 07
0
deployment failures with sqlite3
Hello list, I''m attempting to deploy my first rails app on textdrive and have run into a problem. I currently have lighttpd running and I am able to start my rails app. When I attempt to visit my site I get an: Application Error (Rails) Investigating my production.log it looks like the app isn''t finding sqlite3, right? Do I need to pack that with the app? What about non
2006 Jul 31
0
rescue_action_in_public useless to capture low level errors
Hi all, I''m trying to make for nicer system error handling, with the help of rescue_action_in_public (see Recipe 47, in ''Rails Recipes'') PROBLEM: While it lets me capture an incorrect db name in database.yml (for example), with lower level errors like when the DB server is just down, I still get the default system error screen for MySQL::ERROR :
2006 Jun 30
0
find_by_sql not quoting properly (in acts_as_taggable plugin)
I have run into a very strange problem discovered through the use of the acts_as_taggable plugin, but related to quoting/sanitizing the interpolated list in a find_by_sql. Apologies for the length, but I wanted to be complete. ;-) The method from acts_as_taggable.rb is: def find_tagged_with(list) find_by_sql(["SELECT #{table_name}.* FROM #{table_name}, tags,
2006 Feb 25
0
neverending i2/lighttpd problems
So after recompiling ruby a few times to get ssl and readline working, fighting with lighty for awhile, and learning a bit more about linux in the process, I think I''m really close to getting i2 up and running. However, when I try to access my wiki, I get either a blank page or an error 500 and the stack trace below gets sent to the log. If I can''t get this working soon
2006 May 25
5
Application stops working over night: (Errno::EPIPE (Broken pipe)) is the error
I know this question gets asked a lot but I can''t seem to find the answer when I search through the mailing list. First off here''s my set up. Cent OS 4.3 Apache 2.0 Fast CGI 2.4.0 Rails 1.1 Mysql 5.0 The app starts up fine, but every morning it refuses to start and gives me the dreaded Application error untill I reload Apache. I thought my database was timing out so I added