Stuck 'Your First Rail App' section Step 1.4, $ rails server


#1

Hi Everyone, it appears that $ rails server is not executing fully properly. Screenshot below.

So yeah, http://localhost:3000/cars does’t work. Any help appreciated, thanks


#2

Judging by the bottom of your output, I’d say that you didn’t get webpacker set up! Have you tried running the following command?

bundle exec rails webpacker:install

#3

I haven’t, and to the best of my knowledge don’t remember the tutorial telling me to, but I sure will now!

Thank you for your reply!

EDIT: I ran the command, re-ran the rails server, and everything worked. Thanks again for your help.


#4

You’re very welcome! I believe the tutorial doesnt, but I think it may have to do with the version of Rails you are using. The tutorial uses Rails 5, but in Rails 6 (which released last year), they decided to make Webpacker the default over the Asset Pipeline of old. You absolutely can (and probably should!) continue with 6, but it might be worth it to learn a bit about web pack before you get too deep


#5

This all makes sense, considering I installed the most recent version of Rails over the version in the tutorial. I will definitely learn more about webpack…


#6

Glad you guys got it figured out!

Keep in mind that, while learning Rails, you may run into other weird issues like this since the curriculum uses Rails 5. That being said, you’ll probably come out pretty confident in Rails 6 if you can resolve those issues as they come up. Keep up the good work! :slightly_smiling_face: