s2k

s2k

Author of Fast Feedback Using Ruby

Agile Web Development with Rails 7: Creating a new Rails app with '--css tailwind'

On (PDF) p. 68 the command to create the depot app is given as:

rails new depot --css tailwind

When I run this, I get an exception listed in the output:

/Users/stephan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/yard-0.9.27/lib/yard/rubygems/hook.rb:88:in `require': cannot load such file -- yard (LoadError)
  …/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/yard-0.9.27/lib/yard/rubygems/hook.rb:88:in `load_yard'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/yard-0.9.27/lib/yard/rubygems/hook.rb:163:in `setup'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/yard-0.9.27/lib/yard/rubygems/hook.rb:152:in `generate'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/yard-0.9.27/lib/yard/rubygems/hook.rb:63:in `block in generation_hook'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/yard-0.9.27/lib/yard/rubygems/hook.rb:52:in `each'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/yard-0.9.27/lib/yard/rubygems/hook.rb:52:in `generation_hook'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/request_set.rb:311:in `block in install_hooks'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/request_set.rb:310:in `each'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/request_set.rb:310:in `install_hooks'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/request_set.rb:209:in `install'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:210:in `install_gem'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:226:in `block in install_gems'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:219:in `each'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:219:in `install_gems'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:167:in `execute'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/command.rb:323:in `invoke_with_build_args'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/command_manager.rb:180:in `process_args'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/command_manager.rb:149:in `run'
  …/.asdf/installs/ruby/3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/gem_runner.rb:53:in `run'
  …/.asdf/installs/ruby/3.1.0/bin/gem:13:in `<main>'

And yet, the command ends in ‘Done in 234ms.’ with exit code 0.

The environment:

  • Ruby 3.1.0 installed with asdf
  • Rails 7.0.2
  • asdf 0.9.0
  • yard 0.9.27

So, calling yard from the command line directly works fine. It seems that the yard gem isn’t installed. In fact,

grep -in yar Gemfile

yields nothing and the exit code is 1.

Further observation: Creating a new Rails app without ‘–css tailwind’ doesn’t show this behaviour, i.e. it creates a new app without the exception.

Am I doing it wrong? Should the ‘–css tailwind’ cause ‘yard’ to be included in the Gemfile, but doesn’t?

Any input or help is appreciated.

0 974 4

Marked As Solved

s2k

s2k

Author of Fast Feedback Using Ruby

I figured (most of it) out: I had this in my .gemrc:

install: --rdoc --ri --document=yri
update: --rdoc --ri --document=yri

removing the --document=yri parts, also got rid of the exception.

Popular Prag Prog topics Top

belgoros
Following the steps described in Chapter 6 of the book, I’m stuck with running the migration as described on page 84: bundle exec sequel...
4 1149 1
New
yulkin
your book suggests to use Image.toByteData() to convert image to bytes, however I get the following error: "the getter ‘toByteData’ isn’t...
1 4015 2
New
JohnS
I can’t setup the Rails source code. This happens in a working directory containing multiple (postgres) Rails apps. With: ruby-3.0.0 s...
0 1272 3
New
alanq
This isn’t directly about the book contents so maybe not the right forum…but in some of the code apps (e.g. turbo/06) it sends a TURBO_ST...
1 1363 7
New
Chrichton
Dear Sophie. I tried to do the “Authorization” exercise and have two questions: When trying to plug in an email-service, I found the ...
1 1178 3
New
curtosis
Running mix deps.get in the sensor_hub directory fails with the following error: ** (Mix) No SSH public keys found in ~/.ssh. An ssh aut...
2 1433 3
New
jskubick
I found an issue in Chapter 7 regarding android:backgroundTint vs app:backgroundTint. How to replicate: load chapter-7 from zipfile i...
0 3442 3
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...
0 1104 3
New
mcpierce
@mfazio23 I’ve applied the changes from Chapter 5 of the book and everything builds correctly and runs. But, when I try to start a game,...
0 1136 10
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 ...
1 958 3
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 16827 371
New
AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
30 3331 14
New
New
AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
160 3625 49
New
PragmaticBookshelf
“Finding the Boundaries” Hero’s Journey with Noel Rappin @noelrappin Even when you’re ultimately right about what the future ho...
34 3628 22
New
dimitarvp
Small essay with thoughts on macOS vs. Linux: I know @Exadra37 is just waiting around the corner to scream at me “I TOLD YOU SO!!!” but I...
166 7351 70
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
66 19971 25
New
AstonJ
If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol: bre...
4 4589 1
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
4 3385 2
New
First poster: bot
Large Language Models like ChatGPT say The Darnedest Things. The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
0 2587 1
New