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

abtin
page 20: … protoc command… I had to additionally run the following go get commands in order to be able to compile protobuf code using go...
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
simonpeter
When I try the command to create a pair of migration files I get an error. user=&gt; (create-migration "guestbook") Execution error (Ill...
New
herminiotorres
Hi @Margaret , On page VII the book tells us the example and snippets will be all using Elixir version 1.11 But on page 3 almost the en...
New
gilesdotcodes
In case this helps anyone, I’ve had issues setting up the rails source code. Here were the solutions: In Gemfile, change gem 'rails' t...
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
jskubick
I’m under the impression that when the reader gets to page 136 (“View Data with the Database Inspector”), the code SHOULD be able to buil...
New
gorkaio
root_layout: {PentoWeb.LayoutView, :root}, This results in the following following error: no “root” html template defined for PentoWeb...
New
SlowburnAZ
Getting an error when installing the dependencies at the start of this chapter: could not compile dependency :exla, "mix compile" failed...
New
New

Other popular topics Top

PragmaticBookshelf
A PragProg Hero’s Journey with Brian P. Hogan @bphogan Have you ever worried that your only legacy will be in the form of legacy...
New
New
Exadra37
I am a Linux user since 2012, more or less, and I always use Ubuntu on my computers, and my last 2 laptops have been used Thinkpads, wher...
New
AstonJ
This looks like a stunning keycap set :orange_heart: A LEGENDARY KEYBOARD LIVES ON When you bought an Apple Macintosh computer in the e...
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
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
PragmaticBookshelf
Author Spotlight: VM Brasseur @vmbrasseur We have a treat for you today! We turn the spotlight onto Open Source as we sit down with V...
New
PragmaticBookshelf
Author Spotlight: Bruce Tate @redrapids Programming languages always emerge out of need, and if that’s not always true, they’re defin...
New

Latest in PragProg Customers

View all threads ❯