Installing theme CLI and creating a theme

AI-generated summary

Andrew_Rowe encountered an error while following the theme developer tutorial when running the theme scaffold command, receiving a NoMethodError related to Psych:Module.safe_dump. After editing the post, they noted that installing ruby-dev resolved the issue, as suggested by a bot. The error occurred during the step where the CLI prompts to start “watching” the theme.

I did not want to clutter that topic but I was following this guide

when I got to this step

instead I got

/var/lib/gems/3.0.0/gems/discourse_theme-2.1.6/lib/discourse_theme/scaffold.rb:53:in `block in generate': undefined method `safe_dump' for Psych:Module (NoMethodError)
Did you mean?  safe_load
	from /var/lib/gems/3.0.0/gems/discourse_theme-2.1.6/lib/discourse_theme/scaffold.rb:18:in `chdir'
	from /var/lib/gems/3.0.0/gems/discourse_theme-2.1.6/lib/discourse_theme/scaffold.rb:18:in `generate'
	from /var/lib/gems/3.0.0/gems/discourse_theme-2.1.6/lib/discourse_theme/cli.rb:68:in `run'
	from /var/lib/gems/3.0.0/gems/discourse_theme-2.1.6/bin/discourse_theme:6:in `<top (required)>'
	from /usr/local/bin/discourse_theme:25:in `load'
	from /usr/local/bin/discourse_theme:25:in `<main>'

did I do something wrong?

Edit: The bot said install ruby-dev if you get an error and that worked

3 Likes