similar to: ActiveRecord Unexplainable SystemStackError - Only in WEBrick

Displaying 20 results from an estimated 1400 matches similar to: "ActiveRecord Unexplainable SystemStackError - Only in WEBrick"

2008 Nov 06
10
Rails 2.1.2 bug in include on has_many?
In my continued efforts to port my rails 1.x app to Rails 2.1.2, I keep running into what appear to be ActiveRecord bugs. I am using an :include on a :has_many definition: class Request < ActiveRecord::Base has_many :service_types, :order=>''service_types.id ASC'', :include=>:service_response [...] There''s no reason this wouldn''t be supported in
2010 Dec 09
15
Rails 3 Active Record query returns "undefined method `loaded?' for #<Array:0x126a4c>"
I am getting this error on an rspec test: undefined method `loaded?'' for #<Array:0x126a4c> When I call: Practice.includes("practice_members").all Practice has_many :practice_members PracticeMember belongs_to :practice Practice.all returns: [#<Practice id: 6, name: "Practice One", created_at: "2010-12-09 15:40:46", updated_at: "2010-12-09
2009 Oct 08
6
Eager Loading a Relationship That Has No PK/FK
I''m attempting to wrestle an old DB into Rails. This relationship is giving me trouble: class Show < AR::Base has_many :segments end class Segment < AR::Base belongs_to :show has_one :media #this has no PK/FK relation end A Segment is "linked" to Media by Media.name, which is the result of concatenating Segment.name and Segment.part. As I said there are is no
2006 Mar 09
4
habtm questions
I''ve got some of this working but other parts are ellusive. I have CREATE TABLE `bags` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '''', PRIMARY KEY (`id`) CREATE TABLE `packages` ( `id` int(255) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '''', PRIMARY KEY (`id`) CREATE TABLE
2008 Nov 19
3
Rails.cache and problem with model id?
I have the following: MODEL: def self.get_tag_cloud Rails.cache.fetch(''fetish_tag_cloud'', :expires_in => 1.hour) do find(:all, :conditions => [ "approved_for_tag_cloud = true"], :order => "LTRIM(name)") end end CONTROLLER: def index @fetishes = Fetish.get_tag_cloud end VIEW: .... <% @fetishes.each do |fetish| -%>
2009 Sep 23
5
Overriding AR read/write_attribute - Overridden write_attribute Is Never Called
Could someone explain this? #config/initializers/ar_attributes.rb module ActiveRecord module AttributeMethods alias_method :ar_read_attribute, :read_attribute def read_attribute(attr_name) p "read_override" ar_read_attribute(attr_name) end alias_method :ar_write_attribute, :write_attribute def write_attribute(attr_name, value)
2006 Feb 20
9
a complex availability problem
Ok, this is a hard one and I just thought I''d see if people on the list had any suggestions on how they would approach this, I''ve not started to implement the rails to handle this yet as I''m still at the paper planning phase. I''m building an app that has to handle availability for travel packages. The complexity comes in that a person can choose a start
2009 Jun 22
1
getting error can't modify frozen hash
Hi, When I upgraded my rails application to rails 2.3.2 I am getting error ''can''t modify frozen hash'' on using @something.update_attribute(params[:something]). Can anyone help me who is familiarize with this bug? Thanks,
2008 Mar 08
9
Newbie worries with "Developing Rails Applications on Max OSX Leopard"
Hello There, As a new comer to RoR, I started to follow the article http://developer.apple.com/tools/developonrailsleopard.html. In short you create to entities and one one-to-many relation linking them. Everything was good until the establishment of the relation. I am unable to go any further than "Linking Models Together" : I can create the "vendors" mentionned in the
2012 Apr 19
1
active admin undefined method `' for nil:NilClass
im working with active admin i have collection_select or dropdown box that populates the packages and crews im just wondering i why this undefined method `[]'' for nil:NilClass` i dont know what happened but it run few days ago and tested it once but now it raises this error are there possible way to solve this? def create @package = Package.find(params[:package_crew][:package_id])
2008 Jun 07
2
rcov causing a segmentation fault on rspec 1.1.4 and rails 2.1
Hello again :) I''m trying to run rcov on my specs here but i''m getting a lot of segmentation faults (and they usually happen at different places): /home/mauricio/NetBeansProjects/reeds/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:211: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i486-linux]
2008 Jul 16
3
constructor in model
Hi all, I have an activation model that when constructed should set the key (column in the activations table) to test. class Activation < ActiveRecord::Base belongs_to :user def initialize this.key = "test" end end When i do ac = Activation.new I gget NoMethodError: You have a nil object when you didn''t expect it! You might have expected an instance of Array.
2006 Jul 21
4
observe_field submit behavior
I am using observe_field on a number of multi-selects and checkbox form elements whose values would normally come in as arrays on a normal (non-Ajax) form post. I understand that by using the :with => ''name'' I will get name=value in the request.raw_post however if the field I am submitting has mutliple values and the name is of the form ''name[]'', I get
2005 Dec 15
2
efficient INSERTS
Hi, I''ve got the following models: Company Package with a habtm relationship. In my controller, I have a ''dispatch'' action which does the following @companies.each do |company| @packages.each do |package| company.packages.push_with_attributes(package, :sent_on => Time.now) end end my table ''companies_packages'' therefore lists which
2008 Mar 12
2
nested routes with a 2-way has_many using join table?
I have two classes, InstructionalObject and Assets. They both have_many of the other, implemented through a join table (so it''s like a habtm without the habtm). For the next version of our app, we''re refactoring to RESTful, and i''m having trouble with my nested resources/routes. I tried this, in routes.rb: map.resources :assets do |assets| assets.resources
2011 Feb 10
4
Printer drivers installation: files are not deleted
Hello all, I'm running Samba 3.5.5 on Debian 5, and following the documentation as closely as I can to install drivers using rpcclient. I first install the driver on a Windows 7 x65 workstation, then use rpcclient/smbclient to fetch the files. I then use smbclient to put those on the print$ share of the Samba server. So far, so good. Then I use rpcclient to add those files, and that
2012 Jul 18
5
Any comment on adding #cast and #cast! to ActiveRecord::Relation?
Not getting any love (tender or otherwise) on my pull request<https://github.com/rails/rails/pull/7035>so I thought you folks might like to chip in. What do you think? #cast and #cast! allow you to declare a mapping from generated column names to simplified database column types (i.e. those used in migrations). This way scopes with columns generated in their select lists can also include
2009 Jun 13
5
undefined method `valid_password?'
I''m trying to set up the authlogic gem for rails, just after logging my user I get this weird error: NoMethodError in Usuari sessionsController#create undefined method `valid_password?'' for #<Usuari:0xb69b9a54> RAILS_ROOT: /home/cocozz/dev/enruscats Application Trace | Framework Trace | Full Trace
2011 Sep 04
2
has_many :through basic fubar
I''m trying to do, what seems like, a very basic join. However, the association just doesn''t seem to work. I''m sure it''s something very simple but I don''t know what. class Role < ActiveRecord::Base belongs_to :packages belongs_to :users end class Package < ActiveRecord::Base has_many :roles has_many :users, :through => :roles end
2009 Mar 05
7
issue with the object cache
Hi, I am getting a method_missing error when I run my application in the production environment unless I set config.cache_classes = false in config/environments/production.rb. This happens in Rails 2.2.2 but not in Rails 2.1.0. The method that is missing is one I used to have before I edited by hand the migration that creates the table associated with the object (I know you are discouraged to do