I cannot download the .zip file - after I get past the Certificate errors, I get this response, which suggests a permissions problem:

<Message>Access Denied</Message>

Using the scripts on the github and vagrant up primary, I get a long error output, apparently because of a problem with authenticating the RabbitMQ package.

The first error is:

==> primary: GPG error: http://www.rabbitmq.com testing InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6B73A36E6026DFCA


==> primary: WARNING: The following packages cannot be authenticated!
==> primary: rabbitmq-server
==> primary: E
==> primary: :
==> primary: There are problems and -y was used without --force-yes

I would be happy to post the entire message if that would help.

On page 5-6 of the Chapter 1 preview (I am one of those you imagine reading chapter 1 in the bookstore!) you talk about multiple dispatch (calling different versions of a function based on the argument types), and add "This is a feature derived from Lisp, a language that influenced much of how Julia works under the hood, and one that has not been widely implemented outside various Lisp variants. It is represented in languages like R, but has not gained significant traction, not the least to its not entirely user-friendly nature."

I'm no expert on language design, but I have quite a bit of experience with C++, which calls this feature "function overloading." An example tutorial on the topic is here: http://www.tutorialspoint.com/cplusplus/cpp_overloading.htm . In C++ it is an extremely useful feature, and I would say it is a feature considered quite user-friendly among C++ programmers. In C++, it works with built in types as well as with compound types (structures and classes), and can select the implementation based on the class of the argument, and the classes can be derived from a common ancestor or not.

Redefining the meaning of builtin operators (like +, *, etc.) is also possible in C++, and is called "operator overloading," and described on the same tutorial page referenced above.

I cannot tell you which other languages may also implement this feature, but it might be worth including a mention of C++ in addition to the Lisp variants, since C++ is an important and widely used language, and this functionality is widely used among C++ programmers, although I'm sure Lisp is older than C++ so your comment that the feature is derived from Lisp is probably still true.
In the listing on page 36 (and 39), there is a n at the beginning of some string literals. It could be that a backslash is being lost before the n, so that
is what was meant.

It may be helpful to keep the typos in one thread, so they are separate from the content-oriented posts.
I am skipping typos, but I noted a couple of mistakes your editor might miss.

On page 47, "MondoDB" should probably be "MongoDB"

On page 51, "For all intensive purposes" should be "for all intents and purposes" -- see for example http://grammarist.com/usage/for-all-intensive-purposes/
I'll buy the 2nd edition MEAP as soon as it goes on sale!
I have been using MongoDB for about six months. I just upgraded to the latest ruby drivers, and now when I try to use :safe => true, I get a warning:

@users.save({'lastname' => 'Johnson'}, :safe => true) # =>[DEPRECATED] The 'safe' write concern option has been deprecated in favor of 'w'.

The 'w' parameter is discussed here: https://github.com/mongodb/mongo-ruby-driver/wiki/Write-Concern

The reference above states that 'w' of zero indicates that writes are not acknowledged, and 'w' of one indicates that writes are acknowledged, and notes that the default value for 'w' is 1 as of ruby driver 1.8. It also mentions 'j' and 'wtimeout', without saying anything about what they do.

Perhaps that means that setting 'w' to zero would be the same as :safe => false, and setting 'w' to one would be the same as :safe => true, but I have not found a comprehensive discussion of the 'w' parameter, including anything about recommended practices for using it to replace safe mode.

Also, I have been using MongoMapper for parts of my Rails application (using direct ruby driver for more performance-sensitive parts), and the client objects provided by the latest MongoMapper appear to be setting 'w' to zero.

Can you comment on the relationship between 'w' and safe mode, as you have discussed it in the book? What about 'j' and 'wtimeout?

Thank you so much for the quick reply!

I just want to mention that your book was very helpful to get me started with MongoDB. I had never really looked at NoSQL databases much before, and it was a great introduction. I have been using MongoDB with my Rails project in production for about 6 months, and have been very pleased with how much easier it makes Rails development (and especially managing changes). So, thanks again!

(if they are deprecating Connection class and safe mode, you may have to write a 2nd edition soon!)
As previously noted, the code will all need to be updated for the newest version of the Azure SDK, but it may still be helpful to point out a couple of specific issues. Under Filtering Blobs, there is discussion of ListBlobs at cueball #3, which should be cueball #2.

Listing 5.4 refers to "DeleteContainer", which I think should be "DeleteBlob" for this listing (that could be a painful mistake!)

Section 5.3.3 and listing 5.8 again talk about RoleManager, and also about GetLocalResource. However, I cannot find either of those in the current documentation, and attempting to include them in Visual Studio results in a "not defined" error. What reference and namespace are they in?
Yes, but I did want to be sure you saw the one about DeleteContainer instead of DeleteBlob, because that did not look like a PDC09 update issue.

Great work! I look forward to the update!
In the current Azure SDK, the Storage Client sample used in Chapter 4 is no longer included, at least not with the other samples.

However, it looks like the Microsoft.WindowsAzure.CloudStorageAccount object has taken over its functionality. The thumbnails sample code uses that object.

Documentation for the StorageClient namespace is here: http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.storageclient.aspx

In describing the sample code, the book should mention that it is included in a zip file in the Csmilierogram FilesWindows Azure SDKv1.0 directory. There is a separate zip file for C# and VB. It should be mentioned, because if you go looking for the Samples directory with File/Open Project, you will not find the samples in the zip file.
Although you state that we can just enter the code and your Hawaiian Shirt example will work, that is not true, because your example is incomplete. For example, the RoleManager is not defined in the current Azure SDK, and you talk about, but do not implement, the ProductInfo object, and reference, but do not provide the main.css file. Also, I could not find any reference to the sample code, if it is available somewhere.

Also, the description of the steps in creating the project is incomplete, as you will see if you try to create a project (now called "Windows Azure Cloud Service")

(Note: there is an implementation of a products array on page 3 of chapter 7)
The accompanying listing correctly refers to chisq.test
Although section 4.2.6 describes how apply works, it does not in any way describe how sapply works (other than to say it works on lists). The claim that "we have all of the tools" at the end of 4.2.6 is simply not true without actually explaining how sapply works.

Further, the actual use of sapply in the "solution" (section 4.3) is not described at all, either. Perhaps it will become clearer later, but if you are going to use sapply in the solution, you should at least have told us how it works by this point in the book, or at least by the end of the solution using sapply.

Perhaps my confusion is related to whether "[" is supposed to name a function, and if so, what that function would do.

Also, in 4.2.6, you say that sapply is a user-friendly version of lappy, but I think you mean lapply, since lappy is not found in the help.

Message was edited by:
You suggest this technique in 4.2.3, but then do not use it in listing 4.6, so we cannot follow along with your dataset.
Perhaps I missed it.

Also, you define, but do not use, variable "a" in listing 4.5. I think you meant "sqrt(a)" rather than sqrt(5)
In the table in section 4.2.4, it says

substr(x,2,4) <- "22222" is "a222ef".

However, that function call does not appear to return anything (nothing is shown on the command line), but the function call changes the content of x to "a222ef". That the function changes "x" rather than returning the result of the substitution should be mentioned.

In general, I notice that you use "is" in some places and "returns" in others to mean the same thing. It might be clearer if you always used one or the other.
In 4.2.2, the example for "mean" uses "trim=0.5" to drop the lowest and highest 5%. However, that would require "trim=0.05"
The problem was with the Web Platform Installer. The solution was to ignore the big green "Install using the Microsoft Web Platform Installer" and look for the tiny "you can still get everything you need by downloading the Silverlight 4 Tools for Visual Studio 2010" message. Download the "Silverlight 4 Tools for Visual Studio 2010", and you will get Silverlight4_Tools.exe . Run that file, and it will install Silverlight 4, including the SDK and ability to create and run Silverlight 4 projects from within Visual Studio 2010.

Doing that, I had no trouble getting Silverlight 4 Tools for Visual Studio 2010 to run with Visual Studio 2010 Express or Ultimate, under Windows 7 64 bit.

Once Silverlight 4 Tools for Visual Studio 2010 is installed, you can go back to the Web Platform Installer to install the April 2010 Toolkit.
In following the instructions for downloading Silverlight, I got an error that signature verification failed. The log file included the line DownloadManager Error: 0 : Signature verification failed on downloaded file. URL: http://go.microsoft.com/fwlink/?LinkId=177508. File location: C:Users
achbarAppDataLocalMicrosoftWeb Platform InstallerinstallersSilverlight4ToolsC25C99975F4DA21B7F894208745E39F211E9E536Silverlight4_Tools1.exe. File size: 36833632

I found a post at http://forums.iis.net/t/1169650.aspx suggesting that this has happened before when an error was made updating the Silverlight 4 installer in July. Now, over the past 24 hours, there appears to be a flurry of these errors appearing, suggesting that the same error may have been made again.

There is a link on that page to a non-Microsoft site suggesting that the solution is to uninstall a lot of other software and make some registry changes. Those suggestions run counter to the statement in the book that version 3 and version 4 of Silverlight can co-exist.

Any idea where an official explanation and solution can be found? Does this error also affect our unsuspecting clients trying to use the Silverlight software we are creating? It's not an experience that would engender much confidence in them (or in us)

And if the problem is indeed that certain other software needs to be uninstalled first, I hope the authors of the installation program will re-read Microsoft's design guidelines, which correctly point out that error messages are an essential part of the user interface, and software that provides incorrect error messages is broken. Period.
Thanks for putting together this reference. Nicely done!

I put together a list of typos and issues I noted. Sorry if some of these may be listed in other threads.

I especially like the comprehensive use of the demo code, in a single page which links to all of the demos. Very nice!

This MEAP does not have a date. A date would be helpful in commenting on the text and I noted that at least some other MEAP's by Manning have the MEAP date at the beginning of the MEAP.

p 26 - "lifers-child" should be "li:first-child"
and on the next line, "first-child" should be "last-child"

p 29 - "ply" should be "only"

p 47 - "var has Image" should be "var hasImage"

p 73 - in the description of the outerHeight and outerWidth methods, the text says that the margin flag determines whether the padding is included. In both of those, the correct meaning of the margin flag is to determine whether the margin is included. Again, this error occurs twice.

p 98 - the DOM 0 Events in the example code is a different example from that in the book, but IS the one used for the screen shot in the book (i.e., the code in the book is changed, but the example code and screenshot have not). Similar for the propagation example and the other examples in this chapter

p 116 - "methodsto" -> "methods to", "methodsis" -> "methods is"

p 120 - "important to not" -> "important to note"

p 121 - "includes name-spaced, events" -> "includes name-spaced events"

p 123 - those little "n"'s appear to be what should be bullets (based on page 102 of the first edition) - also on page 116

p 124 - "Ffunctions that serves" -> "Functions that serve" (two errors)

p 129 - The code for the report function in the book appears to be outdated, in that it does not include of event.target.id. The example would be much harder to follow without the event.target.id. Fortunately, the sample code DOES include the event.target.id, as does the screenshot in the book. The code for the report function in the book should be updated to include event.target.id

p 129 - "If we wave our pointer over the inner area, we’ll see a flurry of mouseout and mouseover events." -- I am following the book on a Mac, but I do NOT see that behavior in either Safari or Firefox (I did not test IE). What I DO see is exactly what you show in your screenshot, but no additional events until I leave inner1. Perhaps you meant "if we wave our pointer over the boundary between the inner and outer area, ..."

The "live()" function is referred to on many pages without being described and defined, which is quite confusing (in referring to the first edition, I have surmised that live() is related to the livequery() function). live() is referred to on page 122, and then used significantly starting on pages 139 to 144. live() is clearly important enough that it should be described before being used so heavily. (It is sort-of described on page 139, such that if you already understood what live() did, you would probably understand better, but for someone who does not already know about live(), the description on page 139 is probably not adequate.) You do a good job refreshing the purpose of live() in the text from 139 - 144. All that is missing is a formal definition of the live() function when the other event functions are formally introduced.

p 140 - "needs to db done" -> "needs to be done"

p 145 - "the capabilities afforded to page authors was severely limited" -> were

p 146 - "remainders of the method chain" -> remainder

Chapter 6, page 9 - "xx" (may be a marker)

Chapter 6, page 14 - if the .split function actually returns an empty string where the space was, that might be worth mentioning. If not, the returned values from .split should be corrected to include the space instead of the empty string between "other" and "thing" (in my testing, it looks like it returns a space here, at least in Firefox)

Chapter 6, page 18 - "on te client" -> "on the client"

Chapter 6, page 19 - "we can simple call" -> "we can simply call"

You probably already know that the sample code for chapter 6 is not included.

Chapter 7, page 3 - reference to docs.jquery.com/Plugins -- that page actually refers the user to plugins.jquery.com as the current version

Chapter 7, page 21 - "event the $" -> "even the $"

Chapter 7, page 21 - "out other goal" -> "our other goal"

Chapter 7, page 21 - "accept a single" -> "accepts a single"

Chapter 7, page 21 - "full0-size" -> "full-size"

Chapter 8, page 10 - "under most circumstance" -> "under most circumstances"

Chapter 8, page 15 - I am far from a JavaScript guru, but I believe that Listing 8.5 is missing a ");" after "response" on the line with cueball #2

Chapter 8, page 23 - the description of "cache" appears to have "true" and "false" reversed, based on http://docs.jquery.com/Ajax/jQuery.ajax . It looks like "true" would allow caching, but "false" will force no caching, and that the default is true except for "script" and "jsonp"
Rather than the skeleton shown in the book in listing 2.26, I get:

Given /^I have an account$/ do
pending # express the regexp above with the code you wish you had

Given /^it has a balance of (d+)$/ do |arg1|
pending # express the regexp above with the code you wish you had

When /^I take out (d+)$/ do |arg1|
pending # express the regexp above with the code you wish you had

Then /^my balance should be (d+)$/ do |arg1|
pending # express the regexp above with the code you wish you had

The main difference is the capture groups defined by cucumber for the integers in the skeleton.
1) I am referring to the $: reference in the text rather than in the code sample. I just downloaded the book again moments ago, and the $: is still referred to in the text on that page (although not in the listing). The Manning website shows that the most current version of the book is from September 18, 2010 (although the pdf file itself does not contain a date)

2) I do not get the " NoMethodError in 'Bacon is edible' " shown in the code sample on the top of page 11. I DO get the "undefined method" line shown below it. Obviously, those both refer to the same problem that you fix in the next step.

However, in going through chapters 2 and 3, I found quite a number of differences in the code output and the code output and the code shown, which may represent that both RSpec and Cucumber are undergoing development, and I may be using a more current version than the one you used to generate the code samples.

I also ran into the problem shown on this page https://rspec.lighthouseapp.com/projects/16211/tickets/674-undefined-local-variable-or-method-node-for-capybaradrivernode and had to comment out the line suggested on that page in order to get the examples to work. Thus, I stopped reporting those differences, since I now assume that you will re-run the samples with current code before publishing the book.

Thus, you can probably forget about the #2 above, but I do think you should remove the reference to the $: in the text on page 10. Perhaps you already have, and Manning just hasn't posted the most current version of your book.
"The first line here calls unshift on the $: variable"

However, I only see one line, and I don't see 'unshift'.

The code works for me without the 'unshift'. Perhaps that was left over from a previous iteration?

Except that the error I get is actually:

1) Bacon is edible
Failure/Error: Bacon.edible?.should be_true
undefined method `edible?' for Bacon:Class
# ./spec/bacon_spec.rb:5

so, I get the undefined method error you describe in the text, but I do NOT get the NoMethodError
In section 2.1, you begin "In the Ruby world there's a huge emphasis placed on testing .. mainly due to the points outlined above", which were basically that testing allows you to know that your application is still working properly.

Nothing wrong with that, but that doesn't explain why Ruby is different. I think you miss the real reason that testing is so important in the Ruby world, as opposed to, for example, the C++ world, which is that Ruby is so dynamic that many of the errors that are caught by a compiler in a C++ program will not surface until the Ruby code is actually run.

For example, a misspelled variable name will be caught on compilation by C++, but a Ruby program with a misspelled variable name will happily run until the code containing the misspelling is encountered.

At that point, if the contents of the misspelled variable are being read, Ruby will sometimes raise an error, depending on the kind of variable. However, if the misspelled variable is being assigned to, or if an instance variable is being read, Ruby will create a new variable with the misspelling, there will be no error message, and the code just won't work correctly. Thus, without a test, you won't even know that your variable name is misspelled.

Thus, you need to do testing in Ruby if only to check for misspellings.

Of course, testing is important in C++ too. However, if you are going to comment on the emphasis placed on testing in the _Ruby_ world, I think there is value in pointing out how Ruby is different than compiled languages like C++, for the benefit of programmers coming from C++.
Great job on the book. A few minor points:

On the first page of chapter 8, you say that you will be using jQuery to upload the files, but then the example actually uses the Prototype library. I would have liked to see jQuery, since Prototype is SO Rails 2. Hopefully, you intent is to change the example to use jQuery, but in any case, the text on the first page of the chapter should match the example. (after writing this, I saw that your previous comment about jQuery vs. Prototype. So, consider this a vote that you switch the example back to jQuery rather than changing the text on the first page to Prototype.)

On the bottom of page 10 of chapter 8, you say "running rake db:migrate to migration our ...". I think you meant "migrate" here.

In the second code sample of section 8.4.2, you say "@tickete.assets.build". I think you meant "ticket" rather than "tickete"

Footnote 8 at the bottom of page 33 says "We originally saw these back in Chapter 8". Obviously, this IS chapter 8, so I think you meant to name an earlier chapter.

Page 34, "we have a strong number= which we" -- I think you meant "string" rather than "strong".

On page 26 of chapter 6, "On the second line we add a key called warden to request" -- I think you meant the third line (of the 'before' block) or the fourth line (of the code sample), but not the second line in any case.

Keep up the good work! I look forward to the upcoming chapters!
Far from a noob!

I love the tone of the book. I see lots of books that give lip service to testing, including some that literally say "don't do it the way I have done it" because they don't show any actual testing during development.

Rarely does a book come along that so throughly implements the testing before each and every step, showing how Test Driven Development is actually done.

Great work!
Footnote 7 on page 7 of chapter 3 says that the likelihood of two commits starting with the same first seven characters is 36 to the seventh power. That would be correct if each character could be one of 36 choices. 36 is 26 (the number of letters in the alphabet) plus 10 (the number of digits from zero to nine.)

However, I believe that each character in a git commit string is actually a hexadecimal digit. There are, of course, only 16 of those, usually represented by a digit from zero to nine or a letter from a through f. You will see that every character in every git commit is only one of those 16 choices.

Thus, the actual calculation would be 16 to the 7th power, or 268,435,456.
As chadmoone indicated, that line fails, but

its(:edible?) { should be_true }

FYI, Still getting this error, even with the newer release of the MEAP.
On page 78. you say of the coming section "How is a LINQ to Entities query processed by the Object Services and why does it become SQL instead of triggering an in memory search against the Entity Set?". Then, two paragraphs later you say "Now you know why queries written against ObjectSet<T> are evaluated differently from queries against other data sources. Anyway, you have simply discovered how the query translation process starts and why a LINQ to Entities query becomes SQL"

Actually, nothing in the two intervening paragraphs answers either of the two things you say I now know.

The paragraphs do point out how queries against ObjectSet<T> are THE SAME as other LINQ queries, but nothing about how they are different, and certainly nothing at all about WHY they become SQL. Perhaps something was lost in editing.
Thanks for your reply.

If you and your editor are satisfied that you have answered the "why", I have nothing more to add.

Thanks for your detailed treatment of this important topic. Keep up the good work!
You say "If you have multiple properties that need to be in descending order, you have to add the keyword after all of them."; likely you mean "after each of them".
The text says "Let's start with a simple query that returns only the id and the name of all companies.", but that's not what the code returns.
There are several examples of lambda, where you use "o =>" or "(o, i) =>" as the parameter list, but then use "order" in the code itself. The variable in the code itself should match the parameter in the parameter list. It looks like this is correct in the VB code, and only incorrect in the C# code.

Also, later in the page you say that in C# multiple parameters must be separated by commas and surrounded by "brackets". You should have said "surrounded by parentheses". "brackets" would mean "{ }" (curly brackets) or "[ ]" (square brackets), not "( )".

You also call them brackets when discussing the VB code later in the page.
Page 66: the VB code includes the "Include("OrderDetails")", but the C# code does not.
And then just when everything was working in the debug Flash Player, I decided to fire-up IE & run the application in Flash Player in non-debug mode, and it stopped working: after creating an item, the list blanked out rather than being updated.

Since I initially posted this, I have determined that IE 7 is not even sending the request for the updated, and modified, list to rails, when the application runs in the non-debug version of Flash Player. Firefox, however, does, and thus the application works perfectly in Firefox (or in Flash Player in Debug mode)

Thus, the caching is occuring entirely within Flash/IE, but only when Flash is in non-debug mode.

A "conditional get" can produce a 304 "not modified" response, and that is what I had thought was occurring. However, that IS occurring when other lists are being retrieved. According to Microsoft, the "no-cache" header should prevent caching. The "no-cache" header IS being set in the controller, so that doesn't appear to prevent the problem. It also doesn't seem to prevent the 304 response from being sent by Rails.

For some reason, even though I am creating a new HTTPService object for each call, the return from the POST (i.e., the one object being created) was still being returned in the result event when I sent a GET to obtain the entire list. I could determine that by sending the result event info from the list command to the debug window:

var x:XMLList = XMLList(event.result.children());

Even though this was the result of the GET call, I was still getting the result of the POST. Again, this error appears to be within IE.

My fix (actually more of a workaround) was to add a time-generated string ("?" + Number(new Date()) ) to the end of the request URI, thus avoiding the caching problem. A better solution might be to send a "no-cache" header from the RoR portion, although I have not tested that. More on avoiding caching here:


More evil IE caching, I guess!

James Nachbar

Message was edited by:
nachbar, 6/14/08, to include new info, and correct that caching is occuring entirely within Flash Player/IE, and NOT within Rails, which appears to be working properly.
The book talks about commenting out protect_from_forgery, and then uncommenting it in iteration 5 without mentioning what had changed to allow protect_from_forgery to be used.

In reviewing old vs. new rails code (particularly vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb), it appears that the older versions of rails did not run the forgery protection check for .xml requests, but the newer versions do. Thus, unless you are manually adding the appropriate parameters (see the above file for the current test being done to see if the form request is forged), you will fail the forgery test unless you prevent the test from running. More info on that here:


at a minimum you will need:
skip_before_filter :verify_authenticity_token
in your sessions_controller.rb to avoid the ioError 2032.

You can track this error down by adding a fault event handler to the HTTPService (e.g. in LoginBox.mxml on page 153). You can also look at the output from the server (the "ruby scriptserver" command) which will show status code 422 instead of 200 for the "session.xml" request.

For a more detailed look, go to the rails log at logdevelopment.log and look at the end for the most recent error. It will show that ActionController::InvalidAuthenticityToken was thrown by /vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb:86:in `verify_authenticity_token'

CSRF attacks are not so relevant for applications running within Flash Player (as opposed to, for example, applications running within a browser), since Flash Player won't go from one site to another.

If you want to continue to use forgery protection for the .html requests, the best solution is to

1) uncomment protect_from_forgery (so the protection token is generated),

2) skip_before_filter :verify_authenticity_token in the controllers that need to allow .xml to be served without the forgery protection, and then

3) call "verify_authenticity_token" (the same call used by request_forgery_protection.rb) within the .html generation code that you want to protect. verify_authenticity_token will throw the InvalidAuthenticityToken exception if the token is not correct.

If you want to protect your .xml calls too, the check within verify_authenticity_token is:
form_authenticity_token == params[request_forgery_protection_token]
so you would need to get your rails app to send the form_authenticity_token to the Flex client when the session is created, and then your subsequent calls will need to set the "request_forgery_protection_token" param.

James Nachbar
Update for Rails 2.2: According to the release notes: “Request forgery protection has been tightened up to apply to HTML-formatted content requests only” in Rails 2.2 — I have not tested this, but it should obviate the problem addressed in this post for Rails 2.2 and newer.
This relates to a previous thread, but the solution is buried deep within the thread. There is a bug in Flash Player, which has been reported:


Adobe considers this bug report "closed" with the "resolution" of "cannot fix". Basically, Flash Player HTTPService incorrectly faults on status code 201, which indicates "successful creation". The Rails 2 scaffolding code returns this status code 201 on successful creation, triggering the fault event from HTTPService, and preventing the code in CreateLocationCommand.as on page 318 (for example) from working.

Since Adobe has given up on fixing this error, a workaround is required. One workaround would be to intercept the fault event, locate the status code 201, and treat it as "success". However, I cannot find the status code in the fault event (!). You could also just treat the fault as a "success", but then you wouldn't know whether the create was successful.

The best workaround seems to be to change the status code returned from 201 to 200. This can be done in the rails controller. In this case, using iteration 8 code, pomodo/app/controllers/locations_controller.rb, line 55, change ":created" to ":ok" and CreateLocationCommand.as will work again.

James Nachbar
You have followed the instructions properly (at least regarding this issue). Rails has changed its file naming conventions with Rails 2. '.erb' means "Embedded Ruby".

There is a third edition of "Agile Web Development with Rails" coming out, which teaches Rails 2 - you can get the .pdf of "beta" version of the book at http://pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition . It is HIGHLY recommended if you are at all interested in learning about Rails.

James Nachbar
On my computer, refreshing IE does not work to load the new .swf. I need to close IE and then open a new copy of IE to see the new page.
These are ruby errors; Flex Builder 3 apparently doesn't handle them very well.

In the "Problems" window (showing these errors), in the right upper corner, find the button to open the dialog to configure the filters for this view. Create a new user filter, turn off "Ruby Problems" in "Show items of type" for your filter, then close the dialog, and select your filter in the window menu (also in the upper right corner of the Problems window). That should hide all of these Ruby "errors".

Whether you hide them or not, your Flex program should still work unless there are non-ruby errors, which may be hard to find with all of the ruby "errors" in the window.

James Nachbar
The code in the book works with Rails 2.1, which I am using. The error in your code is the


paramter, which is not in the book (see page 86)

If you remove that, your code will work.

James Nachbar