similar to: looking for help with NoMethodError: undefined method `key?' for #<String:0x4795488>

Displaying 20 results from an estimated 1000 matches similar to: "looking for help with NoMethodError: undefined method `key?' for #<String:0x4795488>"

2008 Jan 16
0
[CruiseControl] RubyOnRails build 8649 failed
The build failed. CHANGES ------- Revision 8649 committed by gbuesing on 2008-01-16 20:07:10 Introducing DateTime #utc, #utc? and #utc_offset, for duck-typing compatibility with Time. Closes #10002 M /trunk/activesupport/CHANGELOG M /trunk/activesupport/lib/active_support/core_ext/date_time/calculations.rb M /trunk/activesupport/test/core_ext/date_time_ext_test.rb TEST FAILURES AND
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 Sep 05
0
rake craziness with Migrate as a dependency
Hi everyone, For one of our projects we have a need to deploy and maintain a demo. As a result I''ve attempted to setup a set of rake tasks for the job. My goal is have one rake task called "deploy_demo" which purges the database, migrates to the current schema, and loads the db from a set of fixture files in a specified location. I''ve written two new tasks the perform
2011 Jul 25
4
Rails 3 test database issues
I am having a problem using the test database in Rails 3. It apparently has kept track of aspects of the database that I deleted completely from my migrations at some point. I don''t always use the ''down'' part of a migration and sometimes just recreate the whole database. I did rake db:migrate:reset and rake db:test:prepare, but when I run my test it is trying to access
2006 Nov 07
4
Unknown column 'id' in 'field list
Hello, I''m trying to write a unit test for model that doesn''t have an ''id'' field. I created the model''s table with the following migration, making sure the primary key was set. class CreateActiveUserMetrics < ActiveRecord::Migration def self.up create_table :active_user_metrics, {:id => false,
2006 Jun 24
5
Rake vs Ruby for running tests (error discrepency)
I''m having (to me) a strange problem with errors when running my tests with rake as opposed to using ruby. If I do rake test:units I get this error for several tests, but not all: 13) Error: test_player_has_game_statistics_for_season(PlayerSeasonTest): ActiveRecord::StatementInvalid: Mysql::Error: Duplicate entry ''22'' for key 1: INSERT INTO positions (`name`, `id`,
2007 Jul 12
0
[retry] fixture_references: "Mysql::Error #HY000"? (fwd)
I''m resending this with additional information, as I''ve had no response. I''ve been trying to use the fixture_references plugin, and I seem to be getting lots of: 1) Error: test_truth(DeviceTest): ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field ''description_id'' doesn ''t have a default value: INSERT INTO devices (`id`) VALUES (2)
2008 Apr 15
2
NoMethodError in StoreController#add_to_cart
I''m trying to set up the Depot app from Agile Web Development and I got this error after C1 - Creating a Cart. The exact error looks like this: ------------------------------------------------------------------- NoMethodError in StoreController#add_to_cart You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occurred while
2005 Dec 30
1
Problems with Testing (Depot) demo app in Agile Rails book
I''ve encountered a perplexing problem whilst following along the demo app in the "Agile Web Development with Rails" book. Any help would be greatly appreciated. Here is a brief time line of my tale of woe:- 0. Been programming (business apps) and designing/building DBs for two decades - but new to both Ruby and Rails (so I apologise in advance if I''ve made some
2006 Jun 05
0
Failed to install Globalize plugin
My envrionment is Rails 1.1.2, Ruby 1.8.4, MySQL 5.0.21 on WinXP. When I run ''rake migrate'' after pulling the lastest 1.1 branch of Globalize plugin, I get the following error message: (in C:/Rails/Application/medicalmind) == GlobalizeMigration: migrating ============================================== -- create_table(:globalize_countries, {:force=>true}) -> 0.2110s
2006 Nov 04
0
Rails newbie - can anyone please help with many to many NoMethodError
Please can someone help with the following problem - I''m using LoginEngine and have a Users table linked many to many to a Plants table. The joining table is plants_users with plant_id and user_id (there are extra fields, so I''m avoiding has_and_belongs_to_many - plus it didn''t work :(). ::user.rb starts:- class User < ActiveRecord::Base has_many :Plants, :through
2006 Aug 14
0
acts_as_dropdown: NoMethodError on load
Rails 1.1.6 on gems I had the acts_as_dropdown plugin working fine, but now starting webrick gives me a: C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1129:in `method_missing'': undefined method `acts_as_dropdown'' for User:Class (NoMethodError) My other plugins are working fine. I have the latest version of acts_as_dropdown. Gems are
2006 Jan 24
0
Fixtures subdirectories
Hi, [This is a repost, I can?t find where went my previous post, ] I wanted to create subdirectories in the fixtures directory in order to be able to manage many different initial states for my system (or to sort fixtures / corresponding model subpackages). I came up with the idea of writing: Test::Unit::TestCase.fixture_path = RAILS_ROOT + "/test/fixtures/selling"
2007 Sep 21
1
Do fixture_scenarios and RSpec peacibly coexist?
Railsters: I just installed fixture_scenarios ... http://fixture-scenarios.googlecode.com/svn/trunk/fixture_scenarios ...into a project with some RSpec specifications. They all went kablooey. I didn''t even create a scenario; the system just started calling its version of fixtures(). The normal tests pass and the RSpec ones unanimously emit: TypeError in ''Context (verbose
2006 Mar 19
3
Can''t add data during migration if column is called "type"
Hi I''m new to Rails. This is my first application and I''m trying to set up a schema I''ve hand-crafted as a migration. Does anybody know why this... # deposit_types create_table :deposit_types do |table| table.column :type_code, :string, :limit => 20, :null => false table.column :description, :string, :limit => 50, :null => false
2006 Jul 21
0
[Slightly OT] Need Query Help
I need to select 1 record from each client. This record has the charge with the most severe charge type (lowest charge_type_id). How do I go about this? I have been using a find_by_sql query out of the client.rb that looks like: SELECT c.f_name AS f_name, c.l_name AS l_name, c.gender AS gender, c.race AS race, c.dob AS dob, c.address AS address, c.city AS city, c.state AS
2007 Sep 27
0
fixture_scenarios in trunk
Hi, I saw a previous post from David answering someones question about fixture_scenarios with rspec. Following that I upgraded my rspec and rspec_on_rails to the trunk versions and then installed the fixture scenario plugin. Now whenever I run my (previously passing rspecs) I get the following error for all tests... ... 148) NoMethodError in ''Cart should show a
2007 Nov 14
6
a few add_index questions..
on previous apps i hadn''t really worried much about adding foreign key indexes on my tables just because they''ve been fairly small and i didn''t really think i needed them. well, i''m working on something now that has the potential to have a lot more data, and a lot more foreign keys. so i have 3 tables... users, projects, and tasks.. should i be using add_index
2006 Apr 13
1
Setting up Testing model, getting an error
I setup a testing model in my Depot web app from the Agile Web Development with Rails book and came up with the following errors: Loaded suite test/unit/product_test Started EE Finished in 0.050279 seconds. 1) Error: test_create(ProductTest): Errno::ENOENT: No such file or directory - /Users/Mike/Sites/depot/config/../test/fixtures/categories
2009 Nov 04
0
The error occurred while evaluating nil.prefetch_primary_key
The error occurred while evaluating nil.prefetch_primary_key? Hi, I have a problem with a model when I have 3 belongs_to relations in one the middle. This example is a subset of a grid-routing project: n 1 1 n +------------ Project Connection ------- ConnectionCost +------------ WaySearchRun