This project is archived and is in readonly mode.

#3570 ✓resolved
Sam Ruby

Intermittent reloading issue: model

Reported by Sam Ruby | December 13th, 2009 @ 12:27 PM | in 3.0.2

During the course of the development of the depot application, the Product model is updated a number of times, and typically no restart of the server is required. On occasion, however a change is not picked up.

One common example is the addition of "has_many :orders, :through => :line_items" done during step 12.1. Often this works just fine, other times the result is an error such as "undefined method orders' for #<Product:0xb7073ee4>".

This does not appear to be a timing problem where multiple edits to the same file occur within the same second; back to back edits in section 6.4 worked just fine, and the edit in section 12.1 was a full 19 seconds after the previous edit to this file.

[2009-12-12 21:10:12] ====> 4 Instant Gratification
[2009-12-12 21:10:13] ====> 6.1 Iteration A1: Getting Something Running
[2009-12-12 21:10:14] ====> 6.2 Creating the Products Model and Maintenance Application
[2009-12-12 21:10:31] ====> 6.3 Iteration A2: Add a Missing Column
[2009-12-12 21:10:41] ====> 6.4 Iteration A3: Validate!
[2009-12-12 21:10:41] EDIT  app/models/product.rb
[2009-12-12 21:10:42] EDIT  app/models/product.rb
[2009-12-12 21:10:42] ====> 6.5 Iteration A4: Making Prettier Listings
[2009-12-12 21:10:44] ====> 7.1 Iteration B1: Create the Catalog Listing
[2009-12-12 21:10:47] EDIT  app/models/product.rb
[2009-12-12 21:10:47] ====> 7.2 Iteration B2: Add a Page Layout
[2009-12-12 21:10:47] ====> 7.3 Iteration B3: Use a Helper to Format the Price
[2009-12-12 21:10:48] ====> 7.4 Iteration B4: Linking to the Cart
[2009-12-12 21:10:49] ====> 8.1 Sessions
[2009-12-12 21:10:59] ====> 8.2 Iteration C1: Creating a Cart
[2009-12-12 21:11:01] ====> 8.3 Iteration C2: Creating a Smarter Cart
[2009-12-12 21:11:03] ====> 8.4 Iteration C3: Handling Errors
[2009-12-12 21:11:04] ====> 8.5 Iteration C4: Finishing the Cart
[2009-12-12 21:11:05] ====> 9.1 Iteration D1: Moving the Cart
[2009-12-12 21:11:09] ====> 9.2 Iteration D2: Creating an AJAX-Based Cart
[2009-12-12 21:11:10] ====> 9.3 Iteration D3: Highlighting Changes
[2009-12-12 21:11:11] ====> 9.4 Iteration D4: Hide an Empty Cart
[2009-12-12 21:11:13] ====> 9.5 Iteration D5: Degrading If Javascript Is Disabled
[2009-12-12 21:11:15] ====> 10.1 Iteration E1: Capturing an Order
[2009-12-12 21:11:21] EDIT  app/models/product.rb
[2009-12-12 21:11:26] ====> 11.1 Iteration F1: Adding Users
[2009-12-12 21:11:31] ====> 11.2 Iteration F2: Logging in
[2009-12-12 21:11:33] ====> 11.3 Iteration F3: Limiting Access
[2009-12-12 21:11:37] ====> 11.4 Iteration F4: Adding a Sidebar, More Administration
[2009-12-12 21:11:40] ====> 12.1 Generating the XML Feed
[2009-12-12 21:11:40] EDIT  app/models/product.rb
[2009-12-12 21:11:50] ====> 13 Task I: Internationalization
[2009-12-12 21:12:06] ====> 14.1 Tests Baked Right In
[2009-12-12 21:12:06] ====> 14.2 Unit Testing of Models
[2009-12-12 21:12:22] ====> 14.3 Functional Testing of Controllers
[2009-12-12 21:12:24] ====> 14.4 Integration Testing of Applications
[2009-12-12 21:12:30] ====> 14.5 Performance Testing
[2009-12-12 21:12:43] ====> 15 Rails In Depth
[2009-12-12 21:12:48] ====> 16 Active Support
[2009-12-12 21:13:00] ====> 17 Migration
[2009-12-12 21:14:15] ====> 18 Active Record: The Basics
[2009-12-12 21:14:28] ====> 19 ActiveRecord: Relationships Between Tables
[2009-12-12 21:14:44] ====> 20 ActiveRecord: Object Life Cycle
[2009-12-12 21:14:58] ====> 21 Action Controller: Routing and URLs
[2009-12-12 21:15:24] ====> 21.2 Routing Requests
[2009-12-12 21:15:28] ====> 23.3 Helpers for Formatting, Linking, and Pagination
[2009-12-12 21:15:46] ====> 23.5 Forms That Wrap Model Objects
[2009-12-12 21:16:04] ====> 23.6 Custom Form Builders
[2009-12-12 21:16:04] ====> 23.7 Working with Nonmodel Fields
[2009-12-12 21:16:04] ====> 23.8 Uploading Files to Rails Applications
[2009-12-12 21:16:07] ====> 23.9 Layouts and Components
[2009-12-12 21:16:07] ====> 23.10 Caching, Part Two
[2009-12-12 21:16:09] ====> 23.11 Adding New Templating Systems
[2009-12-12 21:16:17] ====> 25.1 Sending E-mail
[2009-12-12 21:16:34] ====> 26 Active Resources
[2009-12-12 21:16:42] EDIT  app/models/product.rb

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages