view_component-storybook icon indicating copy to clipboard operation
view_component-storybook copied to clipboard

rake view_component_storybook:write_stories_json not found

Open lannn opened this issue 3 years ago • 5 comments

I've followed this document: https://jonspalmer.github.io/view_component_storybook/guide/getting-started.html and run

rake view_component_storybook:write_stories_json

but rake is not found

rake aborted!
Don't know how to build task 'view_component_storybook:write_stories_json' (See the list of available tasks with `rake --tasks`)

I've tested on both rails 6 and rails 7

lannn avatar Jul 21 '22 15:07 lannn

have you installed the gems with bundler?

jonspalmer avatar Aug 06 '22 14:08 jonspalmer

I'm having the same issue and I have installed both gems with bundler 🤔

deweydell avatar Aug 08 '22 20:08 deweydell

+1 Same issue here.

AlainPilon avatar Aug 10 '22 15:08 AlainPilon

What version are you using? This works in the example app

jonspalmer avatar Aug 12 '22 23:08 jonspalmer

Specifying a require within the Gemfile ended up being the fix on my end for this same issue:

gem 'view_component_storybook', require: 'view_component/storybook'

zthornto avatar Aug 25 '22 22:08 zthornto

Can you please retest this against v1. Many of the internals have changed

jonspalmer avatar Jan 21 '23 14:01 jonspalmer

Still having issues for me unfortunately :/

EricRoos avatar Feb 01 '23 23:02 EricRoos

Just use:

gem "view_component-storybook"

instead of:

gem 'view_component_storybook', require: 'view_component/storybook'

Look carefully at the package name.

navrocky avatar Mar 07 '23 09:03 navrocky

Closing with @navrocky suggestion that this was fixed in v1 admittedly with the confusing but necessary change in package name. Please repoen with reproduce steps if thisis a lingering issue.

jonspalmer avatar May 27 '23 16:05 jonspalmer