# Modern Front-End Development for Rails: B7 no main folder in the source code (page xv)

**URL:** <https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-no-main-folder-in-the-source-code-page-xv/7843>\
**Category:** PragProg Customers\
**Tags:** book-modern-front-end-development-for-rails, errata\
**Created:** [13 March 2021 12:17 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-no-main-folder-in-the-source-code-page-xv/7843 "2021-03-13T12:17:19Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![AleksandrKudashkin](https://forum.devtalk.com/user_avatar/forum.devtalk.com/aleksandrkudashkin/32/2591_2.png) [@AleksandrKudashkin](https://forum.devtalk.com/u/AleksandrKudashkin)\
**Post date:** [13 March 2021 12:17 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-no-main-folder-in-the-source-code-page-xv/7843/1 "2021-03-13T12:17:19Z")

</div>

On the page xv there is an instruction to run `bin/setup` from the `main` folder. I downloaded the source code today (12/03/21) and can’t seem to find that folder. Not sure where to start, I tried going with `server` – no luck:

```auto
ActionView::SyntaxErrorInTemplate in SchedulesController#show`)
Encountered a syntax error while rendering template: check <%= turbo_stream_from(current_user, :favorites) %>

```

Looking at other similar topics I believe I’ll need to start with turbo/01

---

<div class="post-metadata">

**Author:** ![noelrappin](https://forum.devtalk.com/user_avatar/forum.devtalk.com/noelrappin/32/481_2.png) [@noelrappin](https://forum.devtalk.com/u/noelrappin)\
**Post date:** [13 March 2021 18:03 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-no-main-folder-in-the-source-code-page-xv/7843/2 "2021-03-13T18:03:51Z")

</div>

Yeah, sorry, it looks like `main` didn’t get included in the download, starting with `turbo/01` is fine, really running `bin/setup` should work from any of the directories.

Thanks,

Noel

---

<div class="post-metadata">

**Author:** ![nigel-lowry](https://forum.devtalk.com/user_avatar/forum.devtalk.com/nigel-lowry/32/3122_2.png) [@nigel-lowry](https://forum.devtalk.com/u/nigel-lowry)\
**Post date:** [22 July 2021 14:32 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-no-main-folder-in-the-source-code-page-xv/7843/3 "2021-07-22T14:32:49Z")

</div>

`turbo/01` doesn’t seem to be there either. Do you mean `appendix_hotwire/01`?

---

<div class="post-metadata">

**Author:** ![gdonald](https://forum.devtalk.com/user_avatar/forum.devtalk.com/gdonald/32/3754_2.png) [@gdonald](https://forum.devtalk.com/u/gdonald)\
**Post date:** [18 January 2022 00:55 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-no-main-folder-in-the-source-code-page-xv/7843/4 "2022-01-18T00:55:46Z")

</div>

There’s no folder “main”, and there’s no folder “turbo/01” in the download… and it’s been months since people pointed this out. Can you not fix the download? ☹

---

<div class="post-metadata">

**Author:** ![noelrappin](https://forum.devtalk.com/user_avatar/forum.devtalk.com/noelrappin/32/481_2.png) [@noelrappin](https://forum.devtalk.com/u/noelrappin)\
**Post date:** [18 January 2022 02:37 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-no-main-folder-in-the-source-code-page-xv/7843/5 "2022-01-18T02:37:21Z")

</div>

Sorry about the confusion, the current starting folder is `chapter_01/01` (it was `turbo/01` for a while during the beta process).

I’ll look into what I need to do to get that folder copied into main in the download.

Thanks for your patience,

Noel

---

<div class="post-metadata">

**Author:** ![gdonald](https://forum.devtalk.com/user_avatar/forum.devtalk.com/gdonald/32/3754_2.png) [@gdonald](https://forum.devtalk.com/u/gdonald)\
**Post date:** [18 January 2022 16:21 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-no-main-folder-in-the-source-code-page-xv/7843/6 "2022-01-18T16:21:52Z")

</div>

Inside chapter\_01/01 I ran bin/setup, and then I ran rails s.

When I visit localhost:3000 I get errors:

ActionView::Template::Error (Webpacker can’t find application.css in /rails/nrclient-code/chapter\_01/01/public/packs/manifest.json. Possible causes:

1. You want to set webpacker.yml value of compile to true for your environment  
unless you are using the `webpack -w` or the webpack-dev-server.
2. webpack has not yet re-run to reflect updates.
3. You have misconfigured Webpacker’s config/webpacker.yml file.
4. Your webpack configuration is not creating a manifest.  
Your manifest contains:  
{  
“application.js”: “/packs/js/application-e2d1692aebb36c02d64a.js”,  
“entrypoints”: {  
“application”: {  
“assets”: {  
“js”: [  
“/packs/js/runtime-a264c6705547ad01acbb.js”,  
“/packs/js/vendors-node\_modules\_rails\_activestorage\_app\_assets\_javascripts\_activestorage\_js-node\_modules-2576d4-9a719947c3eb6bc6295c.js”,  
“/packs/js/application-e2d1692aebb36c02d64a.js”  
]  
}  
}  
},  
“js/application-e2d1692aebb36c02d64a.js.map”: “/packs/js/application-e2d1692aebb36c02d64a.js.map”,  
“js/runtime-a264c6705547ad01acbb.js.map”: “/packs/js/runtime-a264c6705547ad01acbb.js.map”,  
“js/vendors-node\_modules\_rails\_activestorage\_app\_assets\_javascripts\_activestorage\_js-node\_modules-2576d4-9a719947c3eb6bc6295c.js”: “/packs/js/vendors-node\_modules\_rails\_activestorage\_app\_assets\_javascripts\_activestorage\_js-node\_modules-2576d4-9a719947c3eb6bc6295c.js”,  
“js/vendors-node\_modules\_rails\_activestorage\_app\_assets\_javascripts\_activestorage\_js-node\_modules-2576d4-9a719947c3eb6bc6295c.js.map”: “/packs/js/vendors-node\_modules\_rails\_activestorage\_app\_assets\_javascripts\_activestorage\_js-node\_modules-2576d4-9a719947c3eb6bc6295c.js.map”,  
“runtime.js”: “/packs/js/runtime-a264c6705547ad01acbb.js”  
}  
):  
5:   
6: \<%= csrf\_meta\_tags %\>  
7: \<%= csp\_meta\_tag %\>  
8: \<%= stylesheet\_pack\_tag(  
9: “application”,  
10: media: “all”,  
11: “data-turbolinks-track”: “reload”

app/views/layouts/application.html.erb:8

---

<div class="post-metadata">

**Author:** ![noelrappin](https://forum.devtalk.com/user_avatar/forum.devtalk.com/noelrappin/32/481_2.png) [@noelrappin](https://forum.devtalk.com/u/noelrappin)\
**Post date:** [18 January 2022 17:04 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-no-main-folder-in-the-source-code-page-xv/7843/7 "2022-01-18T17:04:13Z")

</div>

Okay, let me look at this – it does work for me starting from the downloaded source code and going through your steps, but webpacker can be flaky and I have seen this error before.

It does seem from that error that webpack didn’t create an entry for the CSS. It’s supposed to parse the file at `app/packs/entrypoints/application.scss`, but it looks like something went wrong.

A couple of things to try:

- Did the setup run cleanly, and install all the JS packages (specifically did all the sass postcss packages install)? Did it run webpack cleanly, or did it error (It might complain that there are no TypeScript files, that’s fine).
- If setup created a public/packs directory, try deleting it and run bin/webpack – does it complete successfully? Does it create a new public/packs directory? Does the manifest.json file in that directory have an application.css entry?

If that doesn’t work, try running bin/webpack-dev-server in a separate terminal and then running rails s in your main terminal, does that work?

I’m really sorry about this, let me know if this works or what messages you get.

Noel

---

<div class="post-metadata">

**Author:** ![nigel-lowry](https://forum.devtalk.com/user_avatar/forum.devtalk.com/nigel-lowry/32/3122_2.png) [@nigel-lowry](https://forum.devtalk.com/u/nigel-lowry)\
**Post date:** [8 March 2022 14:34 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-no-main-folder-in-the-source-code-page-xv/7843/8 "2022-03-08T14:34:48Z")

</div>

Hi Noel,

I bought this book when it came out last year and despite numerous attempts and following advice on the Web, I’ve never got past the first few pages of the first chapter. Are you able to provide a Docker Compose setup for the first chapter with everything working?

---

<div class="post-metadata">

**Author:** ![noelrappin](https://forum.devtalk.com/user_avatar/forum.devtalk.com/noelrappin/32/481_2.png) [@noelrappin](https://forum.devtalk.com/u/noelrappin)\
**Post date:** [8 March 2022 16:37 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-no-main-folder-in-the-source-code-page-xv/7843/9 "2022-03-08T16:37:37Z")

</div>

Thanks for reaching out, I’m sorry that you are having setup issues.

What errors are you getting? Is it Webpacker related, or something else?

I don’t have a docker compose setup ready, but I might be able to help you get set up depending on what your issue is.

Noel

---

<div class="post-metadata">

**Author:** ![nigel-lowry](https://forum.devtalk.com/user_avatar/forum.devtalk.com/nigel-lowry/32/3122_2.png) [@nigel-lowry](https://forum.devtalk.com/u/nigel-lowry)\
**Post date:** [8 March 2022 16:49 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-no-main-folder-in-the-source-code-page-xv/7843/10 "2022-03-08T16:49:33Z")

</div>

I’m getting the attached error message when I try to access the Rails app.

This looks like a great book and I’m very keen to understand the JavaScript frameworks described but know so little about setting up such a project to really know my way around. I’ve tried a lot of advice on the Web but none of it worked. I can’t get past p16 of the printed book using the `ch01` content from the source code.

 ![Screenshot 2022-03-08 at 16.44.16](https://forum.devtalk.com/uploads/default/original/2X/7/7b3141e7337690a69a904cacf8450eac59058fb2.jpeg)

---

<div class="post-metadata">

**Author:** ![noelrappin](https://forum.devtalk.com/user_avatar/forum.devtalk.com/noelrappin/32/481_2.png) [@noelrappin](https://forum.devtalk.com/u/noelrappin)\
**Post date:** [8 March 2022 17:25 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-no-main-folder-in-the-source-code-page-xv/7843/11 "2022-03-08T17:25:48Z")

</div>

This is a weird webpacker thing that sometimes happens when webpack gets out of sync.

If setup created a public/packs directory, try deleting it and run bin/webpack – does it complete successfully? Does it create a new public/packs directory? Does the manifest.json file in that directory have an application.css entry? What output do you get from running bin/webpack?

It’s also possible that the webpack compilation step is failing and not producing the manifest for the CSS file.

---

<div class="post-metadata">

**Author:** ![noelrappin](https://forum.devtalk.com/user_avatar/forum.devtalk.com/noelrappin/32/481_2.png) [@noelrappin](https://forum.devtalk.com/u/noelrappin)\
**Post date:** [8 March 2022 17:27 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-no-main-folder-in-the-source-code-page-xv/7843/12 "2022-03-08T17:27:57Z")

</div>

Also this [Rails 6: Webpacker::Manifest::MissingEntryError - DEV Community](https://dev.to/dani8439/rails-6-webpacker-manifest-missingentryerror-4fi7) has some advice. You might need to remove the `node_modules` directory and rerun `yarn`.
