BernardK

BernardK

Programming Ruby 3.2 (5th Edition): B4.0 many places, require "name" or require name

@noelrappin

Many places have require “name”, other require name. If you want to have the same style everywhere, the following pages are concerned :

+++++ NOT page 117, last paragraph, When you require BigDecimal, which is OK because require is in the normal font

+++++ page 253, first line after the green Info :

Now the gem is ready to be used, which means that any Ruby program can require rspec and
                                                                -----> ^^^^^^^^^^^^^

+++++ page 256, last paragraph, first and second to last line :

Alternately, inside your code, before you use any gems, you can require bundler/setup, which
                                                         -----> ^^^^^^^^^^^^^^^^^^^^^
...
exec code that also has a require bundler/setup that’s fine, the management work will only be
                   -----> ^^^^^^^^^^^^^^^^^^^^^

+++++ page 257, fourth paragraph from bottom, two first lines :

Be default, when you engage Bundler via Bundler.require or require bundler/setup each gem will
                                                    -----> ^^^^^^^^^^^^^^^^^^^^^
be autoloaded under the name of the gem. In other words, gem rspec implies require rspec.
                                                                    -----> ^^^^^^^^^^^^^

+++++ page 261, second paragraph, two times with mistake (bundle instead of bundler) :

`require': cannot load such file -- bundle/setup (LoadError)
Did you mean?  bundler/setup
`require': cannot load such file -- bundle (LoadError)
Did you mean?  bundler

Shoul be : … rather than require “bundler/setup”, you just require
“bundler”

+++++ page 292, first paragraph, lines 2-3 :

There is the jj method, which you need to require json to have access to, and which creates
                                   -----> ^^^^^^^^^^^^
pretty-printed JSON. It also has y, which comes when you require yaml and produces the
                                                  -----> ^^^^^^^^^^^^

+++++ page 293, second paragraph, lines 1 + 3 :

Alternately, you can use require debug/open in the background process, which allows you to
                  -----> ^^^^^^^^^^^^^^^^^^
the first line; if you want the program to run normally, use require debug/open_nonstop. How
                                                      -----> ^^^^^^^^^^^^^^^^^^^^^^^^^^

+++++ page 296, in Pry, fourth paragraph, lines 2-3 :

that with the same code we used for the debugger earlier, just replacing require debug with
                                                                  -----> ^^^^^^^^^^^^^
require pry and the binding.break call with binding.pry, we get this:
^^^^^^^^^^^ <-----

+++++ page 497, paragraph 3, line 3, already mentioned in a previous post
+++++ page 507, in BigDecimal, fourth paragraph from bottom, first line, as mentioned in the previous post

+++++ page 509, second to last paragraph, line 3 :

The formatter module, which gets mixed in with require random/formatter, gives you a set of
                                        -----> ^^^^^^^^^^^^^^^^^^^^^^^^

+++++ page 510, second paragraph after code, first line :

With the line require random/formatter, you get a number of useful methods mixed in to Random.
       -----> ^^^^^^^^^^^^^^^^^^^^^^^^

+++++ page 567, in FileUtils, second paragraph, first line :

To use these methods, you need to require fileutils. All the methods here are defined as module
                           -----> ^^^^^^^^^^^^^^^^^

+++++ page 639, last paragraph, lines 1-2 :

When using JRuby, you can import any Java library in your Java class path. If you add require
java to your file
^^^^ <----- "java"

Popular Prag Prog topics Top

brianokken
Many tasks_proj/tests directories exist in chapters 2, 3, 5 that have tests that use the custom markers smoke and get, which are not decl...
New
mikecargal
Title: Hands-On Rust (Chapter 11: prefab) Just played a couple of amulet-less games. With a bit of debugging, I believe that your can_p...
New
rmurray10127
Title: Intuitive Python: docker run… denied error (page 2) Attempted to run the docker command in both CLI and Powershell PS C:\Users\r...
New
AndyDavis3416
@noelrappin Running the webpack dev server, I receive the following warning: ERROR in tsconfig.json TS18003: No inputs were found in c...
New
digitalbias
Title: Build a Weather Station with Elixir and Nerves: Problem connecting to Postgres with Grafana on (page 64) If you follow the defau...
New
tkhobbes
After some hassle, I was able to finally run bin/setup, now I have started the rails server but I get this error message right when I vis...
New
andreheijstek
After running /bin/setup, the first error was: The foreman' command exists in these Ruby versions: That was easy to fix: gem install fore...
New
SlowburnAZ
Getting an error when installing the dependencies at the start of this chapter: could not compile dependency :exla, "mix compile" failed...
New
roadbike
From page 13: On Python 3.7, you can install the libraries with pip by running these commands inside a Python venv using Visual Studio ...
New
dachristenson
I’ve got to the end of Ch. 11, and the app runs, with all tabs displaying what they should – at first. After switching around between St...
New

Other popular topics Top

Devtalk
Reading something? Working on something? Planning something? Changing jobs even!? If you’re up for sharing, please let us know what you’...
1016 16836 371
New
Exadra37
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it. Does your monitor have eye p...
New
PragmaticBookshelf
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
Margaret
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
1122 25120 742
New
New
PragmaticBookshelf
Author Spotlight Rebecca Skinner @RebeccaSkinner Welcome to our latest author spotlight, where we sit down with Rebecca Skinner, auth...
New
New
CommunityNews
A Brief Review of the Minisforum V3 AMD Tablet. Update: I have created an awesome-minisforum-v3 GitHub repository to list information fo...
New
New

Latest in PragProg

View all threads ❯