By Developers, For Developers
PDF Pg | Paper Pg | Type | Description | Fixed on | Comments |
---|---|---|---|---|---|
10 | SUGGEST | You can use ‘docker rm 15708ecf4251 577cacdd3383’ instead of ‘docker rm 15708ecf4251 && docker rm 577cacdd3383’ to remove both containers at the same time. | 2018-05-14 | ||
11 | TYPO | At the end of the page: “You should see the Rails gem and all its dependencies being installed. This Should be: “You should see the Rails gem and all its dependencies being installed. This
| 2018-05-14 | ||
15 | TYPO | Second paragraph: “(technically a pseudoterinal or pty)” should be: “(technically a pseudoterminal or pty)” | 2018-05-14 | ||
17 | TYPO | Missing a period : “However, manually running the commands is not I think should be: “However, manually running the commands is not | 2018-05-14 | ||
18 | TYPO | Actual: Should be: Missing an “a”, and an unnecessary comma. | 2018-05-14 | ||
20 | TYPO | Actual: “We’re using it in our Dockerfile because the official Ruby image that our image builds on top of is based on the Debian — specifically a version called Jessie.” Should be either: | 2018-05-14 | ||
42 | TYPO | On point 3: “we sped up our image builds” should be “we speed up our image builds” | 2018-05-14 | Thanks Patrício! \n \nHowever, on doing a bit more digging, I believe “sped up” is the most preferred American English usage (see https://english.stackexchange.com/questions/114620/speeded-vs-sped). Cheers. | |
36 | TYPO | Actual: Should be: | 2018-05-14 | ||
11 | ERROR | The command `$ docker run -i -t —rm -v $PWD:/usr/src/app ruby:2.4 bash` does not work on Windows in either the command prompt or Powershell. It can be modified to `docker run -i -t —rm -v ${pwd}:/usr/src/app ruby:2.4 bash` on Powershell, but I’m not a very serious user of the command prompt, so I don’t know the translation. | 2018-05-14 | ||
11 | ERROR | This command: did not work for me on MacOS (High Sierra). I eventually figured out by googling that I had to enclose $PWD in quotes like: to get it to work. | 2018-05-14 | Rob: This should be resolved by the fix to #82991 which uses ${PWD} - I believe this is the most universal solution that should work in Windows Powershell, macOS and Linux. | |
60 | TYPO | “For our purposes though, we don’t really care what we use Redis, we care more about how to use it.” should be “For our purposes though, we don’t really care what we use Redis for, we care more about how to use it”. | 2018-05-14 | ||
63 | SUGGEST | After running docker-compose stop and then docker-compose up -d, I found that the Redis container had maintained the hit count (I verified that both containers were stopped before bringing them back up). So when I refreshed the web page, it said “This page has been viewed 6 times” and it continued counting up from there. I assume that this is expected behavior for Redis within a stopped container, but wasn’t totally sure because the text in the book suggests the counter would have started over. | 2018-10-03 | Yep, stopping and relaunching the container will preserve the hit count. I've now updated the text to better reflect this, and the image now shows the hit counter continuing to update. \nMany thanks for this feedback! | |
60 | TYPO | Actual: Should be: | 2018-05-14 | ||
60 | TYPO | Actual: Should be: | 2018-05-14 | ||
79 | ERROR | I might be doing something wrong…or there is something wrong with the example on this page. After I set up the volume declaration and go through the steps to try to create the persistent volume…and then delete the container…and recreate the container…my database is gone. My guess is that /var/lib/postgres/data needs to exist and be writable by the owner/user of the docker-compose process…namely my personal account. I’ll dig further tomorrow but the example might need some supporting rules regarding path selection etc. | 2018-09-26 | Didn't hear back from you, but am presuming you figured this out. Let me know if you're still experiencing any issues. | |
22 | ERROR | WORKDIR statement should be WORKDIR /usr/src/app/myapp As the app was created with “rails new myapp” inside /usr/src/app? | 2018-05-14 | Hey, thanks for submitting this. However, we changed directory (`cd`) into the `myapp` folder on our local machine, and are telling Docker to copy the files from that current dir (`myapp`) inside the container at `/usr/src/app`. So, inside the container, `/usr/src/app` is the top-level folder containing our Rails project files. \n \nSo I think perhaps you missed changing into the `myapp` directory which is why you needed to make the change you did. I don't believe this is an error though. \n \nCheers. | |
36 | TYPO | I believe in the second paragraph, “feedback look” should be “feedback loop”. | 2018-05-14 | ||
47 | ERROR | After pressing Ctrl+C to shut down the container, it is no longer possible to start it, because: “A server is already running. Check /usr/src/app/myapp/tmp/pids/server.pid.” The output from docker-compose before ctrl+c: Creating dockerrails_web_1 … done | 2018-06-18 | The “Problem Starting Rails?” box on p. 47 now covers this. | |
47 | SUGGEST | Regarding #83015 | 2018-05-14 | Thanks Torben! \n \nI've added an extra "aside" here where you encountered this to give some help on how to resolve it if a reader experiences the issue at this point. This should save other readers some difficulty here if they encounter it - so many thanks. | |
49 | TYPO | The I guess it should be “we’ve seen” | 2018-05-14 | ||
60 | TYPO | (Compose uses the <appname& | 2018-05-14 | ||
30 | TYPO | “What we really want is factory — hint hint — for creating these perfect, Rails server containers.” Should be: “What we really want is a factory — hint hint — for creating these perfect, Rails server containers.” | 2018-05-14 | ||
36 | TYPO | Paragraph two, sentence 1 reads … close the feedback look…. I think it should be | 2018-05-14 | ||
10 | SUGGEST | “Docker’s built-in delivery mechanism means that new team members can go from zero to running app in seconds.” - in seconds is kind of not realistic. In my reality it is closer to “in minutes”. At least one needs to pull some images, which already takes a few minutes usually. | 2018-05-10 | ||
17 | TYPO | Built date in the Client section of docker version has missed its alignment spot. Built: Wed Mar 21 23:06:22 2018 | 2018-05-14 | Thanks. This actually was a bug in Docker's version output, but they've fixed it in the latest version, so this is now fixed. | |
22 | SUGGEST | Removing containers using their names also works: and also with a single command instead of combined 2 commands. | 2018-05-14 | Thanks for submitting this. \n \nI've updated the `docker rm` command to show that multiple containers can be removed with a single command. However, for now, I've decided to not mention that you can also use container names for deletion. We don't really discuss container names much in the book. We could include it, but it would probably require changes in a number of places, so I'm going to leave this for now. | |
86 | TYPO | I’ve chosen to focus on configuring feature specs in this chapter last sentence s/b …" relevant to system tests." | 2018-05-14 | ||
15 | TYPO | To achieve a long-lived, interactive Bash session inside a Docker container, we have to tell Docker to setup a terminal emulator for us (technically a pseudoterinal or pty), that sits in front of Bash. pseudoterinal should be pseudoterminal | 2018-05-14 | ||
5 | SUGGEST | When describing the Windows installation, you should at least mention the fact that the Windows Installer does not work on the Home Edition, due to the lack of Hyper-V support. Instead you have to use the Docker Toolbox to install Docker on Windows Home. | 2018-09-26 | Thanks very much for your feedback. I've rewritten the Windows installation section to explain the need for Hyper-V support, and point readers whose systems don't support it, to Docker Toolbox. \n \nThese changes will be available in an upcoming release. | |
18 | TYPO | “So what’s real the solution” should be “So what’s really the solution” | 2018-06-18 | ||
21 | TYPO | “overlayed” should be “overlaid” | 2018-06-18 | ||
66 | ERROR | The screenshot on this page should show an incremented count of views. Also, the screenshot on p. 65 should not be pluralized. | 2018-10-03 | Thanks very much for this feedback! I've now updated the text to better reflect this, and updated the image, plus fixed the pluralisation. Cheers! | |
75 | ERROR | The environment block in the docker-compose.yml at the top of the page has a new key and value (POSTGRES_DB). I’m not certain it’s supposed to be there, but it should either be noted as an addition or just removed. We remove it entirely before restarting the database server, so it doesn’t break anything, but it’d be good to remove if unnecessary. | 2018-06-18 | Thanks, I've now addressed this and added it earlier and included it in the commentary. | |
53 | TYPO | If the “docker-compose down” command actually removes “network” and “volume” resources, in the last paragraph of the page, where it says “…and don’t want to free up space…” it should say “…and want to free up space…”. | 2018-06-18 | ||
74 | ERROR | If the password has some strange characters, i.e. ]UH{Sl[g{UfL7Q(KYm#0 - this will fail to work: To make it work we will need to wrap that password in quotes: | 2018-06-18 | Thanks for the feedback. I want to be consistent and use either all the env var lines quoted or none of them quoted. We only need the quotes for these if you use special, unusual characters. I’ve decided to leave it as is for now because it’s simpler without the quotes, and I’m assuming the reader has enough knowledge/experience to either know, or at least debug this easily if they run into it. | |
80 | SUGGEST | Please could you explain where those volumes are stored? volumes: | 2018-09-30 | Thanks for the feedback. I've added an aside box with some details on this near the end of the chapter. I felt it was more appropriate as an aside than in the main text because it's not necessary to know this to use them, so it feels more like extra info for the curious. \n \nThis will be available in an upcoming release (assuming my editor is happy with the change). \n \nThanks! | |
90 | SUGGEST | While decoupling data from Postgres container, I would like to suggest that we also decouple gems installed into a volume. This way every time we add/change the gem we do not have to install all of them each time. I did that before using a volume but with a different technique. I will try to do it with the technique used for db-data volume. | 2018-06-18 | We address how to do this in Chapter 8 “Advanced Gem Management Strategies”. | |
84 | SUGGEST | In PowerShell, `&&` is not a valid statement separator. stackoverflow.com/questions/2416662/what-are-the-powershell-equivalents-of-bashs-and-operators has some explanation, but it might be good to separate the command using `&&` into two separate commands, despite the elegance of uniting them in Bash-like shells. | 2018-06-18 | Many thanks, yes, good point. I've now added an aside to address this for Windows/PowerShell users, and included the link you provided. | |
108 | TYPO | Lines in the code are numbered incorrectly. Current line 10 is actually line 8 :-) etc. | 2018-06-18 | ||
115 | TYPO | expore - did you mean explore? | 2018-06-18 | ||
116 | SUGGEST | I would like to suggest that you present techniques for the cleanup of the images left there after docker-compose build. What does it mean for our little laptops if we have dozens of untagged, not needed docker images of which each is over 1GB? Would those take our precious SSD disk space? | 2018-09-26 | Thanks, yes, good call. :) \n \nI've added an info box to mention the `prune` family of commands - hopefully this is what you were intending. Assuming my editor is happy with the change, this will be released in an upcoming version. Cheers! | |
37 | ERROR | Isn’t the Dockerfile WORKDIR instruction kinda wrong because we now have the rails app in ./myapp (we instructed the rails gem to create the new app in there) so now running rails s in /usr/src/app will fail? | 2018-06-18 | We actually `cd` into `myapp` on our local machine on p. 12, so our current dir is *inside* the Rails root. \nWe also mention that we are inside the Rails root on p. 21 in the discussion of the `COPY` instruction. | |
104 | SUGGEST | I have a suggestion about the second strategy for the advanced gem management. I found that if I mount a volume as vendor/cache I don’t need to change the BUNDLE_PATH env variable. gem-cache:/usr/src/app/vendor/cache This is based on this reference: Maybe I’m wrong and am missing something but it seems to be working nicely. | 2018-09-26 | Hey thanks for the feedback. This was actually an approach I tried in researching the book, but I ran into an issue. If I recall, it was to do with the local volume you mount into the image masking the vendor/cache directory, which could cause some weirdness. In the end I ruled that out, but if it's working well for you, then go for it. :) | |
100 | TYPO | Wrong line numbers. … it busts the cache for line 8 -> line 10 | 2018-06-18 | ||
100 | TYPO | The line numbers are incorrect on the Dockerfile listing on the page. This makes the explanation below the snippet somewhat confusing. | 2018-06-18 | ||
92 | SUGGEST | Might be good to add that if the reader sees an error when trying to start the chrome service mapping to their local 5900 port, this may not work if they already have something running there on their local machine. On Mac OS X, this is can happen if the reader has screen sharing turned on in their System preferences. | 2018-06-18 | Yep, that will definitely help users that have something running already on port 5900. I've added an aside to address this. Thanks. | |
54 | SUGGEST | Before wrapping up Chapter 4, I expect to see a service added to the docker-compose.yml that covers the configuration of a “webpack” service that runs on port 3035 that provide packs, now that these are a major feature in Rails 5.x. | 2018-09-26 | Thanks, yes, a description of how to configure webpack was missing from early versions of the book. This is now covered in Chapter 7 "Playing Nice with JavaScript". | |
103 | SUGGEST | You are saying to set BUNDLE_PATH variable but it’s BUNDLE_GEMFILE that is used : and set the BUNDLE_PATH environment variable so that Bundler picks up the ENV BUNDLE_GEMFILE /usr/src/app-gemfiles/Gemfile | 2018-09-26 | Yes, whoops. :) Thanks very much - I appreciate the feedback. I've updated this in my local version, and it will be fixed in an upcoming release. Many thanks. | |
129 | TYPO | The sentence is not finished in the following phrase: | 2018-09-26 | Thanks, yes, good spot. :) \n \nI've fixed this in my local version, and will be available in an upcoming release. | |
106 | ERROR | When modifying the Dockerfile to use a Gem Cache Volume as displayed on page 106 of the pdf there is an issue. I got an error about “rails” not being in the path… I solved it by adding “bundle exec” before the rails command, e.g. ‘CMD [“bundle”, “exec”, “rails”, “s”, “-b”, “0.0.0.0”]’ This makes sense as that is the only way that rails is available in the image… But surprised it wasn’t necessary earlier. | 2018-09-26 | Thanks for submitting this, and I'm sorry you experienced this issue. \n \nYes, there was some inconsistency in previous versions of the book with regards to how we called `rails`. I've now standardized on using `bin/rails` everywhere (will appear in an upcoming release), but this will be similar to calling `bundle exec rails`, both of which should solve your problem. | |
19 | SUGGEST | There are separate RUN commands in the Dockerfile for apt-get update and the apt-get install here and in the rest of the book. Isn’t it better to have those both in the same command (i.e. apt-get update && apt-get install) so that if the nodejs install is tweaked in the future (to grab a specific version, etc.) it will cache bust the update (or else it’s using an old update possibly looking for a newer version of nodejs that wasn’t available when it was cached) ?? | 2018-09-29 | Hey Joe, yep, you're absolutely right. Thanks for reminding me about this. It was a deliberate choice to use separate `RUN` instructions initially because I wanted to avoid the extra complexity you mention. However, I forgot to come back and address this at a later stage once the `Dockerfile` concepts were a bit more familiar. \n \nI've now added an extra section on this in the "Fine-tuning Our Image" chapter - this update will be available in an upcoming release. \n \nMany thanks! | |
106 | ERROR | (follow-on to previous erratum for this page). Also just adding to the path would find rails without using “bundle exec”. I noticed this reading the Dockerfile for the ruby images. I added the following to my Dockerfile: ENV PATH $BUNDLE_PATH/bin:$PATH I’m not sure they are all needed but they fixed the error of not finding rails on the path. (I derived these from the way the ruby:2.4 image was setup). | 2018-09-26 | Thanks for this. See my response to your other errata item. \n \nI haven't found the need to set these environment variables, other than where they are done so for a specific reason in the book (e.g. in "Advanced Gem Management Strategies" chapter). | |
87 | SUGGEST | While following the instructions to run the tests for the first time, the command “docker-compose exec web rails spec” did not issue any output. I tried calling RSpec directly with “docker-compose exec web rspec spec” and this time it worked, so you may want to review the correct command. | 2018-09-26 | Thanks for taking the time to submit this. I'm sorry you encountered the issue. \n \nI'm auto-running all the commands in the book and capturing the output which is inserted, so I'm not sure why you experienced this. My version has already been updated to use `bin/rails` for all commands instead of just `rails`, so perhaps this could have caused the issue. Perhaps try the commands in the upcoming, latest version and let me know if you experience any issues (if so, any more details you have e.g. what system you're using etc would be extremely helpful to try to pin this down). | |
85 | TYPO | Comment on L10 of Dockerfile Currently reads
Should read
Also, some of the other comments seem to have extraneous # symbols at the end, which don’t align with anything. I know these are only comments, but everything else in this book is so precise and well thought-out that even the slightest deviation from that really stands out! | 2018-09-26 | Thanks very much for the feedback and kind words. I've corrected the comment with the typo (will be released in an upcoming version), but I'm not seeing the extraneous '#" symbols. Was it in the same `Dockerfile` you were referring to, or somewhere else? (If the former, it's possible I'd already fixed the issue in my local version. :) ) \n \nI'm closing for now, but please submit another issue if you have more details on the `#`s. \n \nCheers! | |
88 | ERROR | The command $ docker-compose up -d webpacker_dev_server should read $ docker-compose up -d webpack_dev_server as this is the name of the service as defined by the docker-compose.yml file listed on pages 86 to 87. | 2018-09-26 | Thanks very much! I've corrected this in my local version, and it will go out in an upcoming release. Cheers! | |
109 | ERROR | The text explaining the ENV line in the Dockerfile during “Strategy 1 (bundle add then Commit)” mentions BUNDLE_PATH, but the example source code correctly uses BUNDLE_GEMFILE. | 2018-09-26 | Yes, whoops. :) \n \nThanks very much - I appreciate the feedback. I've updated this in my local version, and it will be fixed in an upcoming release. Many thanks. | |
112 | SUGGEST | The Docker volume previously created for the PostgreSQL data was db-data, with a hyphen; for the gem cache, it’s gem_cache, with an underscore. Might it be wise to be consistent with naming? | 2018-09-29 | Yep, good call. :) \n \nI've updated this in my local version, and it will be updated in an upcoming release. I'm standardizing on the underscore format, because Compose reports output e.g. "Creating volume "myapp_gem_cache" with default driver" which looks weird with hyphens. | |
75 | SUGGEST | You say to create a file called web and one called database in the dir .env/development. But you do not say what type of files these are, ie .yml or .rb or just a file with no type ending. Would be nice to know what type of file your referring to. Thanks for the book, using it a lot! | 2018-11-19 | Thanks for the feedback. I've added some text to indicate that I'm intending for these to be created without a file extension. However, I've also added a further sentence now to say that you can choose whatever file structure and naming convention you like, so long as you refer to them correctly in the `docker-compose.yml` file. Hope that helps! | |
82 | ERROR | The top paragraph states that we can reload /users and the database will still be there. However, because the database files were previously living within the database container (i.e., before the db-data volume was referenced), the migration only applied to the database files within the container, which we just deleted. the bin/rails db:create and db:migrate need to be re-executed once the database container referencing the volume has been recreated. Note that the db:create will again report that myapp_development already exists, based on the database configuration in the environment variables. | 2018-11-26 | Hey, thanks for submitting your feedback, but I'm a bit confused. \n \nI think you're saying that we need to re-run bin/rails db:create and db:migrate after we delete the initial database container (before db-data was added). But that is what I believe the text currently does say to do: \n \n``` \nSince our new volume is now mounted in the container, we’ve wiped any \nprevious databases and data we had stored, so we’ll need to recreate and \nmigrate the databases. \nLet’s do this now: \n$ docker-compose exec web bin/rails db:create db:migrate \n``` \n \nAm I missing something? If there's an issue here I definitely would like to fix it. \n \nThanks! \n \n(marking as fixed for now, but please re-open if you have more details) | |
134 | ERROR | In the first paragraph after the feature table, “Swarm vs Docker” should probably be “Swarm vs Kubernetes” | 2018-11-19 | Thanks yep, I've fixed this and it should be updated in the next version. \n \nCheers! | |
88 | ERROR | Hi, when setting up the Javascript stuff on a Mac 10.14.1 (18B75) using Docker Version 18.06.1-ce-mac73 (26764) stable I get an rb-inotify resource overflow error for each of the web pack install commands. See output below. https: //gist.github.com/timharding/96f608d94a6049a987c97e1da4d1913f I have no idea if that stuffs up the process or not but it is alarming. | 2018-11-26 | Hey Tim, thanks for submitting this feedback. I've noticed this too. I'm not 100% sure, but I think it could be related to a bug in the `rb-inotify` gem (or possibly a knock-on issue in this gem from elsewhere) -- see https://github.com/guard/rb-inotify/issues/61. \n \nIt is alarming like you say, but, for me at least, hasn't caused any issues that I've noticed. I'm not sure what to do about it -- I guess maybe adding a aside in the book to at least mention the issue. \n \nThanks again. \n \n--------------- \nJust a quick followup... I've added an aside to at least acknowledge the issue. | |
65 | ERROR | The command should be `docker-compose up -d` instead of `docker-compose up -d web`. Since in the previous section where we install the redis gem we didn’t run the redis service by it’s own. The reader will get, Redis::CannotConnectError (Error connecting to Redis on redis:6379 (SocketError)): | |||
117 | 106 | ERROR | Hello, Thank you, | ||
151 | ERROR | To build prod tag image the following command is given : docker build -f Dockerfile.prod -t robisenberg/myapp_web:prod . Which, at least for me, fails as precompiling assets requires some environment configuration not available without compose. KeyError: key not found: “DATABASE_HOST” (Hash#fetch raises when not found) Giving nil default values solved it, but now I feel a little dumb using fetch to fallback on nil, as simple hash access would to the exact same thing. host: <%= ENV[‘DATABASE_HOST’] %> | Hi, I'm afraid I'm not seeing this in my version - not sure what the difference is. Would welcome some more details if you have (although the book is going to print shortly). | ||
61 | TYPO | “that let’s us compose” should be “that lets us compose” in the second para of ch 4. | 2019-01-15 | ||
88 | TYPO | “conatiner” should read “container” in paragraph starting “We could have used exec instead of run —rm” | 2019-01-15 | ||
112 | TYPO | “capabilties” should read “capabilities” in paragraph starting “Though slower to run” | 2019-01-15 | ||
133 | ERROR | The docker-entrypoint.sh script should really start with “#!/usr/bin/env bash”, as it uses bash-specific syntax, and /bin/sh is not always symlinked to bash. The script as written will work on macOS and Ubuntu/Debian, but it’s best practice to use env here. | |||
140 | TYPO | “nfrastructure” should read “infrastructure” in the “configuration management” paragraph. | 2019-01-14 | ||
124 | TYPO | “Unfotunately, this seems to be a long-standing…” should be “Unfortunately, this seems to be a long-standing…” | 2019-01-15 | ||
161 | TYPO | “frst” should be “first” in paragraph starting “OK, now that we have an image” | 2019-01-14 | ||
153 | TYPO | “let’s” should be “lets” in paragraph starting “Before we conclude this chapter” | 2019-01-15 | ||
163 | TYPO | List item 3: missing a full stop at the end. | 2019-01-14 | ||
164 | TYPO | “environments” should be “environment” in second paragraph. | 2019-01-15 | ||
172 | ERROR | The db-creator and db-migrator entries need to be added as children of the services key, but this is not clear from the text. Adding them as root elements causes the deploy to fail. | |||
173 | ERROR | If using a private registry, “docker stack deploy” fails. It would be useful to mention the need to run “docker login” first, and then to add “—with-registry-auth” to the “docker stack deploy” flags. | 2019-01-15 | True, but I'm afraid I'm running out of time on getting the book ready for print, and the "happy path" of the book is using Docker Hub so I'm going to leave out this explanation for now (but will reconsider if we do another edition/update). Cheers. | |
174 | SUGGEST | This section greatly needs some information on troubleshooting — in my case, myapp_db-creator remains at 0/1, and “docker service logs myapp_db-creator” shows “PG::ConnectionBad: could not connect to server: Connection refused”. There is no information whatsoever on how to track down things like this, and the “discuss” link leads to a page complaining about the FOSTA-SESTA Act (rather than to a third-party discussion site run by a non-US company, which would be the customer-friendly way to handle this). Please could we have pointers on how to fix issues like these? | 2019-01-15 | Thanks for the feedback here John. This section has been reworked to fix your issues. | |
18,22 | ERROR | In Dockerfile, I needed to change “WORKDIR /usr/src/app/” to “WORKDIR /usr/src/app/myapp” to run successfully. | 2019-01-15 | I think this is because you missed on p.13 where we cd into the `myapp` directory. | |
NA | SUGGEST | Please feel free to close bug #84084 re: adding “myapp” to WORKDIR. Turns out if I had read page 23 I would have placed it in the myapp directory and it would work fine. Thank you. | 2019-01-15 | ||
28 | TYPO | “part” should perhaps be “parts” in “…they are described and managed as fundamental part of your app” | 2019-01-15 | ||
165 | ERROR | After completing “docker stack services my app” several times I never got the db-creator or db-migrator to 1/1. I later read on to the next chapter and found “docker stack ps my app” reporting an error saying No such image: macpclinux/myapp_web:latest". This got me to looking at the file ‘docker-stack.yml’ and see that the web was looking at :prod but the creator and migrator were not. I think this could be the problem and that it has to be updated. | 2019-01-15 | Thanks John, apologies for this error. I believe it's now been fixed. Thanks for reporting it. | |
179 | ERROR | The keyboard shortcut for refresh is given as Ctrl-C or Cmd-C — this should be Ctrl-R or Cmd-R. | 2019-01-15 | Good catch. Thanks! | |
10 | TYPO | /app/src/app should read /usr/src/app | 2019-01-15 | ||
13 | TYPO | This has been reported by other people but not on this page. >> Here, mounting the local volume meant that the Rails project generated inside the container (within /app/src/app) Should be … (within /usr/src/app) | 2019-01-15 | ||
46 | SUGGEST | 1. You fail to explicitly mention to go ahead and create docker-compose.yml 2. If creating docker-compose.yml with textmate it is very difficult to avoid tabs which will break docker-compose, I had to use vi to get it to work. | |||
55 | TYPO | (the Dockerfile containers the bundle install command.) should read | 2019-01-15 | ||
59 | TYPO | Beginning of chapter 5 It’s poor grammar to use both ! and ? to end a sentence. It would be better to change this to: “Redis! What about setting up the database?” | 2019-01-15 | Thanks for taking the time to provide your various feedback. We have fixed and incorporated a lot of them, so thank you. \n \nThis one though I'm keeping: it's a colloquialism called an "interrobang" (https://en.wikipedia.org/wiki/Interrobang) to express disbelief at the question. I didn't know there was an official name for this until I just looked it up, but I've seen it in common use. | |
63 | TYPO | So there you have it. Our Redis server is up and running, and we can connect to it from a seperate container. SEPARATE | 2019-01-15 | ||
90 | TYPO | Ok, we’ve our app is configured for webpacker and React - remove we’ve | 2019-01-15 | ||
116 | TYPO | Terrible grammar. Our web service should already be stopped, and we removed its container earlier, so to create a new web container along with the gem_cache volume, we just do: Change to read as follows: Our web service should already be stopped and we removed its container earlier. To create a new web container along with the gem_cache volume, we just do: | 2019-01-28 | ||
130 | TYPO | For some (possibly virtual) nfrastructure, should read: For some (possibly virtual) infrastructure, | 2019-01-15 | ||
130 | TYPO | Additionaly, when things go wrong, should read: Additionally, when things go wrong, | 2019-01-15 | ||
136 | TYPO | Incomplete sentence and should have a comma after “locally”. We’ll use this shortly to first create instances running on VirtualBox locally on page 155 and then . | 2019-01-15 | ||
138 | TYPO | It provides a fully-managed clusters, should read: It provides fully-managed clusters, | 2019-01-14 | ||
66 | ERROR | Using Redis.new in the controller will start a new Redis connection every time for every request. This will not scale well. The solution is to create a config/initializer/redis.rb file and place the following code in it. redis_url = ENV.fetch(“REDIS_URL”) Then, in the welcome controller, change to this code: REDIS.incr “page hits” This way, you will always be using the same Redis connection. I set my REDIS_URL environment var as follows: For local rails, in an .rbenv-vars file as “redis://localhost:6379” For Docker, in the .env file as redis://redis:639/0 For Kubernetes in my deployment yaml as for Docker. | |||
82 | ERROR | docker-compose rm -f database fails because you have saved changes in the docker-compose.yml file that are invalid. Better is to stop the database and remove it before saving the xml file. | |||
177 | 177 | ERROR | On page 179, when I run the command ‘docker-compose build web’ I get the follow error after having updated my Dockerfile like page 177 suggest: I am on Mac OS Mojave 10.14.2 and on docker: Server: Docker Engine - Community | ||
NA | NA | ERROR | In Part 1, section 1, “Generating a Rails App without Ruby Installed”, there is the command: $ docker run -i -t —rm -v ${pwd}:/usr/src/app ruby:2.6 bash Instead of ${pwd}, you want $(pwd), so the command would be: $ docker run -i -t —rm -v $(pwd):/usr/src/app ruby:2.6 bash | ||
522 | ERROR | This is an extension to #84003 originally submitted by Thomas Battiston. Apparently the issue is related to the command for precompiling assets, requiring several environment variables for completion. Using docker-compose provides them through the .env mechanism, however ‘docker build’ is not aware of those variables. I could only solve through using several ARG lines in Dockerfiles.prod . It works but it’s not the most elegant solution. Maybe there’s a better way of doing it? I had to provide for the following variables: DATABASE_HOST, POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB. I even provided RAILS_ENV=production in order to avoid some message about outdated yarn resources. | |||
25 | TYPO | 5th sentence, “just build” should be “just built” | 2019-01-28 | ||
38 | TYPO | 6th line, “instructions” should be “instruction” | 2019-01-28 | ||
39 | ERROR | “If you look through the output, you’ll see that steps 1 to 3 all say Using cache .” Actually, only step 2 says that. | |||
46 | TYPO | On the 13th line, “collection” should be “mapping”. | |||
54 | TYPO | In the last terminal session, the command should be `docker run` | |||
55 | TYPO | Line 19: “the Dockerfile containers” should be “the Dockerfile contains” | 2019-01-28 | ||
59 | TYPO | 6th line, “Ruby server” should be “Rails server” | |||
84 | TYPO | 4th line from the end: “it’s” should be “its” | 2019-01-28 | ||
88 | TYPO | Line 12 “mechanism” should be “mechanisms”. | 2019-01-28 | ||
90 | TYPO | Above “Compiling Assets with Webpacker” heading. “Ok, we’ve our app is configured for webpacker and React.” “is” should be removed. | 2019-01-28 | ||
89 | SUGGEST | In the Dockerfile, tee is not really necessary since we’re running the command as root (it’s not prefixed with sudo). We can use a regular redirection character: RUN echo “deb https//dl.yarnpkg.com/debian/ stable main” >/etc/apt/sources.list.d/yarn.list | |||
90 | SUGGEST | The “docker run” commands can take a “—rm” option to use throwaway containers. | |||
93 | TYPO | “Let’s modify our the generated view” should not contain “our” | 2019-01-28 | ||
94 | TYPO | Bullet number 4, “an run a React app” should be “and run a React app” | 2019-01-28 | ||
100 | TYPO | "Create the file spec/system/page_views_spec.rb and edit it to look as follows: Let’s start with this:" The second sentence should be removed. | |||
100 | SUGGEST | “Linux Users: File Ownership” We have not Rails-generated anything here, I’m not sure we need to chown anything. | |||
104 | SUGGEST | Not sure we need to chown anything here since we did not generate anything with Rails. | |||
115 | SUGGEST | 6th line …/gems here is misleading as someone may easily think it refers to a gems directory in the parent directory. I suggest removing the … here. | |||
122 | SUGGEST | Code sample can use `rm -f` to avoid the need to check for the file. Same thing on page 123. | |||
123 | SUGGEST | Last sentence of last paragraph does not add anything knew since we have already added an ENTRYPOINT in our Dockerfile on page 122 (bullet point 3) | |||
169 | TYPO | Code sample contains # START_HIGHLIGHT and # END_HIGHLIGHT | 2019-02-11 | ||
174 | TYPO | “Put this in your .bash_rc file or equivalent” It’s .bashrc (without an underscore) | |||
179 | TYPO | Last line, Dockerhost should be Docker host | |||
195 | TYPO | “We’re currently maintaining two files in Compose format: docker-compose.yml and docker-compose.prod.yml” The latter should probably be “docker-stack.yml” | |||
102 | ERROR | from: | |||
64 | 49 | TYPO | In the light green Info box, the line | ||
65 | 50 | TYPO | In the green info box the same erratum as before: | ||
66 | 51 | TYPO | Same as the last two. | ||
122 | 110 | TYPO | Another green info box referring to Chapter 9 instead of Chapter 10 | ||
171 | ERROR | ``` | |||
174 | ERROR | Running command: | |||
25 | ERROR | I’m using MacOS 10.13.2 with Docker Desktop 2.0.0.0-mac81 After following all the steps, and attempting the ‘docker run’ command for the first time, I see the following error followed by a stack trace: #<LoadError: Error loading the ‘sqlite3’ Active Record adapter. Missing a gem it depends on? can’t activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0. Make sure all dependencies are added to Gemfile.> I did some searching, and it appears to be an issue with the most recent stable Rails release - 5.2.2: stackoverflow.com/questions/54527277/cant-activate-sqlite3-1-3-6-already-activated-sqlite3-1-4-0#answer-54729071 I added ’ , ~> 1.3.6’ to the sqlite3 line in Gemfile, updated, re-ran ‘docker build’ and the server then started correctly. | |||
38 | ERROR | “This tells Docker to copy all the files from our local, current directory ( . ) into The section quoted above is wrong. The source path on our local machine is relative to the docker context supplied to the build command: $ docker build -t If the -f setting is omitted, docker looks for the file “Dockerfile” in the top-level location of the docker context. | |||
25 | ERROR | Due to release of sqlite3 1.4.0, Rails 5.2.2 ActiveRecord sqlite3 adapter requires 1.3.x and fails to work with sqlite3 1.4.0, though a new Rails application created through the tutorial will reference it via the Gemfile. The fix is to lock sqlite3 to a 1.3.x version, e.g. gem ‘sqlite3’, ‘~> 1.3.0’ Then build your docker image. | |||
25 | ERROR | Following the instructions, I’ve built a Dockerfile, built the image, and asked it to run using the $ docker run line shown n the middle of the page (substituting my image ID for the example). I get no output about Puma booting, etc.; I do get an error when I attempt to visit localhost:3000 in Firefox: Puma caught this error: Error loading the ‘sqlite3’ Active Record adapter. Missing a gem it depends on? can’t activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0. Make sure all dependencies are added to Gemfile. (LoadError) It appears something in the bundle install process isn’t correct; perhaps the Gemfile is wrong? I tried adding “, ‘>= 1.4.0’” after the “gem ‘squlite3’” entry but that generates an exception in the localhost:3000 page, “No connection pool with ‘primary’ found.” Not sure how to fix this. | |||
90 | ERROR | Running “docker-compose build web” on my Mac OSX 10.13.6 emits a warning about line 13 of the Dockerfile: Warning: apt-key output should not be parsed (stdout is not a terminal) but this doesn’t seem to affect the rest of the successful build. | |||
27 | SUGGEST | I had to login to Docker before docker-compose would work for me. Prior to that I got: dockerpycreds.errors.StoreError: Credentials store docker-credential-osxkeychain exited with “The specified item could not be found in the keychain.”. | |||
40 | ERROR | Gemfile.lock is mentioned as already existing but I carefully followed all steps and there is no Gemfile.lock To create Gemfile.lock, I did this: BTW, I’m loving this book. Its been many years since I’ve read a tech book this good (been on it all day and just want to keep going). I’m learning a ton. Thanks for writing it. | |||
28 | TYPO | Last line of the page: “all IPv4 address on this machine.” should be ““all IPv4 addresses on this machine.” | |||
47 | ERROR | $stdout.sync = true should be STDOUT.sync = true | |||
79 | SUGGEST | if set, it uses the value of the POSTGRES_DB environment variable as the name for this table should be: if set, it uses the value of the POSTGRES_DB environment variable as the name for this database | |||
115 | ERROR | When using the Gem Cache Volume, the following command no longer works: | |||
151 | ERROR | So, while trying to build Dockerfile.prod, i ended up failing, because the .env environment variables are not loaded, and asset:precompile initialize the app. I had to add them by end to make it work :/ | |||
288 | ERROR | The alternative way to see the hostname change in the welcome page using the curl command does not work, since the app is not on localhost but on the virtual machine host (in the case of the author on IP address 192.168.99.100). Instead of localhost:3000 it should be 192.168.99.100/ or [enter local-vm-1 ip address here]/ | |||
151 | ERROR | We previously removed RUN bundle install from the Dockerfile when discussing gem caches. The production image isn’t going to build properly, because now we’re trying to do RUN bin/rails assets:precompile There is no Rails, because we have no gems. I suspect that the concept of a gem cache has been abandoned at this point in the book, but if that was ever mentioned I missed it. | |||
172 | ERROR | When adding netcat to RUN apt-get, docker does not like the comment on the same line following the line continuation slash; it treats the next line as a new instruction. Error response from daemon: Dockerfile parse error line 20: unknown instruction: NODEJS Moving the comment to its own line above seems to work. docker version 18.09.2 | |||
147 | ERROR | I’m using Rails v.6.0.0.rc1 What happens: Workaround | |||
166 | ERROR | $ docker stack deploy -c docker-stack.yml myapp | |||
4 | SUGGEST | For MacOS users that have brew installed, you can also do “brew cask install docker”, and you will be setup. I would like to see this added after the first paragraph for MacOS installation. | |||
25 | ERROR | with Docker 18. 09.2 on the Mac it looks like the “-t” option is required to show command output without buffering. $ docker run -t -p 3000:3000 a1df0eddba18 \\ Or maybe it’s something in my .dotfiles that’s doing this…. | |||
100 | ERROR | I got the following error when executing: $ docker-compose exec web rspec spec/system/ An error occurred while loading ./spec/system/page_views_spec.rb. NameError:
Finished in 0.00039 seconds (files took 0.18156 seconds to load) The fix for me was to add: to the top of the file spec/spec_helper.rb I could not find this in the text for the book. | |||
56 | ERROR | When “Connecting Our Rails App to Postgres” and utilizing the env files. running the command ‘docker-compose run —rm web bin/rails db:create’ docker-compose run —rm web bin/rails db:create I have confirmed no spaces are present in the env files | |||
120 | ERROR | Postgres named volume. Asking to run migration after container deleted and recreated. | |||
84 | ERROR | Postgres named volume added Users records are not available from named volume | |||
22 | SUGGEST | For Rails 6+ you need to install recent version of Yarn and run a rails webpacker:install. Edit the Dockerfile like suggested bellow, and everything runs fine. NOTE: REMOVE THE *, I was not allowed to add hyperlinks in this code snippet. FROM ruby:2.6
RUN apt-get update -yqq COPY . /usr/src/app/ WORKDIR /usr/src/app | |||
106 | ERROR | When I try to run the system tests with JS as per your instructions, I get: Selenium::WebDriver::Error::WebDriverError: I have the following in my development/test block in my Gemfile: group :development, :test do Here is my docker-compose.yml file: version: “3” services: webpack_dev_server: database: redis: selenium_chrome: volumes: | |||
64 | 50 | ERROR | A server is already running error at this point can’t be solved by deleting tmp/pids/server.pid on the local machine because at this point, the server.pid file isn’t on the local environment. This is because files generated by the container aren’t syncing onto the local environment at this point. To get rid of the error, I had to remove the container. I began to see the server.pid file only after adding volume to the web service in the next section. | ||
91 | ERROR | In the “Problem Starting Rails?” section at the end of the page, it’s written that “you’ve run into a bug with Compose”. This is not a bug with Compose, this is a Ralis-specific bug. please refer to Docker docs here docs.docker.com/compose/rails/#define-the-project | |||
91 | SUGGEST | Apologies, this applies to various pages so I can’t provide a specific page number. The final docker-compose.yml file contains two named services that include an underscore in them: webpack_dev_server and selenium_chrome. These are not valid hostnames and therefore I think they should be renamed either with dashes instead of underscores, i.e. webpack-dev-server and selenium-chrome, or without a separator, i.e. webpackdevserver and seleniumchrome. This would also need to be changed where the two hostnames are referenced as well. This invalid format only caused me an issue when I upgraded to the 2.2.x version of rack in my latest Rails app. An improvement in rack has resulted in the gem strictly parsing hostnames and this broke my containers in a specific way: when I start the web container it is no longer able to connect with the webpack_dev_server, trying to connect on webpack_dev_server:3035:80 (note the appended default port, :80). I’m not sure whether renaming services is the correct approach to solve the hostname error in a docker environment, particularly when running multiple containers for a service. Please advise whether there is a better solution to this invalid hostname problem. Thanks! | |||
90 | 93 | SUGGEST | ERROR: Compiling Assets with Webpacker: Issue: React “hello_react.jsx” not auto-updating. Webpacker Log Excerpt: 2020-04-01 16:50:52 +0000: Rack app error handling request { GET /packs/js/application-d6267116cab8ac92bbc5.js } INFO: Rails version: 6.0.2.2 ROOT CAUSE: An improvement in rack has resulted in the gem strictly parsing hostnames and this broke my containers in a specific way: when I start the web container it is no longer able to connect with the webpack_dev_server [see above error] SOLUTION: \t1. Updated docker-compose.yml & ./config/webpacker.yml [docker-compose.yml] version: ‘3’ services: webpackdevserver: redis: database: volumes: [webpacker.yml] development: # Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules # Reference: https://webpack.js.org/configuration/dev-server/ | ||
91 | ERROR | As of rack 2.2.2 hostnames with underscores are no longer valid. This means the webpack_dev_server service must be renamed to webpack-dev-server and references by the web service using WEBPACKER_DEV_SERVER_HOST=webpack-dev-server. The caused error in the rails server logs looks like this: | |||
1 | SUGGEST | Rails comes with minitest as standard and some guidance for minitest users in how to setup selenim-chrome for system tests would have been nice. I don’t use RSpec (and have no wish to) and trying to convert your setup for RSpec into what I need for minitest has made this task more difficult than necessary. | |||
79 | 65 | ERROR | There seem to be several issues related to Rails 6, Webpacker, and Yarn that would be worth clarifying. It took a lot of trial and error to get those pieces to work prior to the Redis chapter. I can get yarn to install (thanks to a previous errata), and can add the Webpacker init command and yarn update in the right spots. After that, I cannot get any ‘docker-compose up web’ command to work. The issue seems to be that mounting the local directory into the docker directory has some conflicts with init files. I tried doing ‘rails webpacker:install’ in the local directory, this fails because the gems are now out of sync (since the local directory never ran bundle install). I tried to ‘bundle install’ in the local directory, but then got errors about the yarn version out of sync and the server failed to start. I also tried removing the yarn install and Webpacker install commands from the Dockerfile. The only thing I can do to get this to run, is to remove the volume mount from the web service definition. (The copy is fine, but the mount seems to not work). I’m sure there is some slight discrepancy in the two setups, but I can’t resolve it at this point. | ||
80 | 66 | SUGGEST | An answer to my previous issue where the rails server would not run saying ‘yarn packages are out of data’. I did manage to get it working with the local volume enabled. docker-compose run —rm web bash now docker-compose up -d web should run There seems to be some incompatibility somewhere (node version, yarn version, exact node_modules loaded - not sure) that causes this. Running this command through the container shell, not local seems to put things in the right state for the container server to start. If you run ‘yarn install —check-files’ in the local shell, it gets messed up again and you have to repeat the above commands. | ||
877 | ERROR | Rob Isenberg is dreadfully far behind other Docker authors on this one, it’s frustrating to read so many errata and still no sign of update. | |||
110 | ERROR | At the end of chapter 2, after following all steps to T, I get this error: /usr/local/bundle/gems/webpacker-4.2.2/lib/webpacker/env.rb:30:in `available_environments’: undefined method `keys’ for false:FalseClass (NoMethodError) Can anyone help please? | |||
110 | ERROR | As shown, the Rails build includes webpacker in the Gemfile but this gem requires installation from the command line as well. (I assume this is addressed in the JavaScript chapter.) This prevents the Rails app from running. The following line in the Gemfile needs to be commented out before spinning up the Docker image: gem ‘webpacker’, ‘~> 4.0’ | |||
512 | ERROR | In the section titled ‘Migrating the Database’, pdf page 516 says to download the ‘wait-for’ script into the Rails root folder. I used the script located at www.github.com/mrako/wait-for but it did not work. I was able to go in to the container and run the migration, but the db-migrator does not work as written. | |||
512 | ERROR | In the ‘db-migrator’ service’s command config, the 2nd and 3rd arguments need to be reversed like this: |