similar to: Problem with ActiveForm

Displaying 20 results from an estimated 10000 matches similar to: "Problem with ActiveForm"

2006 Mar 29
0
Intermittent error - undefined method ''destroy_without_callbacks''
When testing my app locally I''m getting intermittent errors which are driving me mad! The error is: NameError ((eval):1:in `alias_method'': undefined method `destroy_without_callbacks'' for class `Exercise''): Refreshing the browser sometimes fixes it, as does restarting WEBrick. Annoying to debug as it only happens intermittently. Any ideas on why this is
2009 Apr 26
1
validators.rb breaks after update from Rails 2.2.2 to 2.3.2
I just updated my rails application from 2.2.2 to 2.3.2 and the following message is displayed while trying to start with ./script/ server: [code] => Booting Mongrel => Rails 2.3.2 application starting on http://0.0.0.0:3000 /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/core_ext/module/aliasing.rb:33:in `alias_method'': undefined method `valid?''
2006 Jul 04
1
How to override ActiveRecord#base#destroy
Hello, I have a database table with a primary key not being a simple id but three columns. By overriding update() and create() I got Rails to work with that table quit good. Except for the destroy() action. From the resulting trace I can see that the old version of destroy() is called from transaction.rb. I think this lines might be the reason that I''m unable to override detroy():
2005 Dec 02
8
UserEngine: stack level too deep
Hi, I''m trying to get the UserEngine running. I have installed the LoginEngine, added the essential lines to environment.rb / application.rb and application_helper.rb. Worked fine. Then I did the same with the UserEngine and when trying to set up the db: rake engine_migrate ENGINE=user I get: Migrating engine ''user_engine'' rake aborted! stack level too deep But...
2011 Feb 09
0
Weird error after upgrading to rails 3.0.4
Hey folks, have you seen this ever? [user@i ~/rails_project]$ rake rails:update --trace (in /usr/home/rails_project) rake aborted! uninitialized constant ActiveModel::Validations::HelperMethods /usr/local/lib/ruby/gems/1.8/gems/activemodel-3.0.4/lib/active_model/ validations.rb:50 /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.4/lib/ active_support/concern.rb:52:in `class_eval''
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''
2006 Nov 20
0
End-of-File Error occured at <except.c>:79 in xraise
On an average I get this error twice or thrice a week. After I rebuild the index Event.rebuild_index it works fine. I''m a bit puzzled by this behavior. Why does this happen? I am using AAF. End-of-File Error occured at <except.c>:79 in xraise Error occured in store.c:216 - is_refill current pos = 301, file length = 301 /usr/local/lib/ruby/site_ruby/1.8/ferret/index.rb:517:in
2006 Aug 27
0
problem with mysql gem
Hi. Whenever I use activerecord I get this error NameError: uninitialized constant Mysql. I installed the mysql 2.7 gem and I''m on Rails 1.1.6 / Ruby 1.8.4. The gem was built successfully using ''gem install -- --with-mysql-config=/usr/local/mysql/bin/mysql_config''. Here''s a sample trace of the error in ''script/console'': >> User.find 1
2006 Sep 20
0
boy, that mongrel_upload_progress handler sucks!
I started actually using the upload progress handler, and noticed it was leaking memory over time. Looking at the code, I noticed that cancelled uploads weren''t being cleaned up. I bugged Zed about adding a request_abort callback to handlers, but I found a simple way to monkey patch that in: # config/mongrel_upload_progress.conf # yes, this file is being used with -S meaning
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 11
0
count not working?
I''m having some trouble with the count method on AR objects. Here is a stack trace: >> t.subscriptions.count ArgumentError: wrong number of arguments (2 for 3) from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/ lib/active_record/calculations.rb:160:in `add_limit!'' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/
2008 Jan 18
2
NameError when using alias_method -- but method exists?
Hello Rubyists, I am a bit stumped here. I want to extend the ''load_file'' method in the YAML module. Following along with the PickAxe example of making old methods do new things, I try this in irb: >> module YAML >> alias_method :orig_load_f, :load_file >> def load_file(*args) >> contents = orig_load_f(*args) >>
2007 Oct 07
1
How to store a Mechanize object in the database?
Hi, I am trying to save a Mechanize object in database (using a Rails Model). But the save operation throws a TypeError Considering that "agent" is an instance of a Rails Model and "user" is defined as a "text" type in the Model. irb(main):039:0> agent.user = WWW::Mechanize.new #<WWW::Mechanize:0xb71295f0 @follow_meta_refresh=false, @key=nil,
2006 Feb 28
0
ActiveRecord: Legacy primary keys
Hi, I''m building a frontend for a legacy schema, with tables like this: CREATE TABLE `types` ( `a_type_cd` varchar(6) NOT NULL default '''', `a_type` varchar(30) NOT NULL default '''', PRIMARY KEY (`a_type_cd`) ); The primary key is specified by the user (not auto-generated), and needs to be updateable. I create the following a base class to
2008 Jun 24
2
wrong number of arguments (1 for 0) when using respond_to?
Trying to get an otherwise working app (in Rails 2.0.2) up to speed with Rails 2.1.0 and Ruby 1.8.7, I have some broken code I can''t seem to fix: module Pathmaker def self.append_features( base ) base.before_save do |model| model.path = model.name.downcase. gsub( /\ and\ /, ''-'' ). gsub( /\ on\ /, ''-'' ).
2008 Jul 08
0
Bug with serialized columns in console ?
Hi, I recently added 2 serialized columns in my class Server : class Server < ActiveRecord::Base serialize :visa, Hash serialize :appli, Array ... No problem in my controller and my application and everything works as expected : Excel exports following the "visa" Hash or "appli" Array are ok. But since I added the visa Hash, I can''t load the record with
2006 Sep 26
0
Find Returning String Instead of Integer?
Any ideas on why this is? The quantity field in mysql is INT, but I get back a string? This is preventing me from using the increment method. >> @cart = Cart.new => #<Cart:0x2730f40 @new_record=true, @attributes={}> >> @cart.items << Item.find(:first) => [#<Item:0x272d6ec @attributes={"vendor_id"=>"1",
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
2006 Sep 04
2
"include" versus "extend" - what's the difference
Hi, Just wondering when one would use "include" over "extend"? Both seem to bring in methods to the class no? The context is I''m just trying to understand why both are used with the acts_as_audited plugin: Full extract from plugin (used within here): ================================================== # Copyright (c) 2006 Brandon Keepers # # Permission is hereby
2012 Sep 28
0
Overriding class_attribute writers and order of super/extend C.M./included block eval in ActiveSupport::Concern
I have: module MySpike extend ActiveSupport::Concern included do class_attribute :foobar, instance_writer: true end end But, I want to be able to override the class attribute writer and/or instance writer method to do something when the attribute is set via self.foobar = true before or after calling super to set the attribute. Unfortunately, I can''t find a clean way