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.

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 Pragmatic Bookshelf topics Top

johnp
Running the examples in chapter 5 c under pytest 5.4.1 causes an AttributeError: ‘module’ object has no attribute ‘config’. In particula...
New
jeffmcompsci
Title: Design and Build Great Web APIs - typo “https://company-atk.herokuapp.com/2258ie4t68jv” (page 19, third bullet in URL list) Typo:...
New
sdmoralesma
Title: Web Development with Clojure, Third Edition - migrations/create not working: p159 When I execute the command: user=&gt; (create-...
New
edruder
I thought that there might be interest in using the book with Rails 6.1 and Ruby 2.7.2. I’ll note what I needed to do differently here. ...
New
New
leonW
I ran this command after installing the sample application: $ cards add do something --owner Brian And got a file not found error: Fil...
New
Charles
In general, the book isn’t yet updated for Phoenix version 1.6. On page 18 of the book, the authors indicate that an auto generated of ro...
New
brunogirin
When installing Cards as an editable package, I get the following error: ERROR: File “setup.py” not found. Directory cannot be installe...
New
dtonhofer
@parrt In the context of Chapter 4.3, the grammar Java.g4, meant to parse Java 6 compilation units, no longer passes ANTLR (currently 4....
New
davetron5000
Hello faithful readers! If you have tried to follow along in the book, you are asked to start up the dev environment via dx/build and ar...
New

Other popular topics Top

AstonJ
Or looking forward to? :nerd_face:
New
AstonJ
poll poll Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New
Exadra37
On modern versions of macOS, you simply can’t power on your computer, launch a text editor or eBook reader, and write or read, without a ...
New
foxtrottwist
A few weeks ago I started using Warp a terminal written in rust. Though in it’s current state of development there are a few caveats (tab...
New
PragmaticBookshelf
Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
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...
New
PragmaticBookshelf
Author Spotlight Mike Riley @mriley This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
New
PragmaticBookshelf
Author Spotlight Rebecca Skinner @RebeccaSkinner Welcome to our latest author spotlight, where we sit down with Rebecca Skinner, auth...
New
New
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New

Latest in Agile Web Development with Rails 7

Agile Web Development with Rails 7 Portal

Sub Categories: