Best practice for running downloaded code?

macktastick macktastick posted on 2025-05-15 20:00:07 UTC

Hi - I'm new here! Enjoying the lessons, but I'm having a little trouble running the sample code (well, it runs locally fine but JS/CSS don't seem to be working). 

Is there an article somewhere that explains how to get up and running with the sample code? I'm probably just missing something (and I'm a little rusty). So far, I've tried:

* downloading/extracting the relevant .zip
* run `bundle` 
* run `bundle exec rake db:create`
* run `bundle exec rake db:migrate`
* run `bundle exec rake db:seed`
* run `bundle exec rails s`




David Kimura PRO said about 1 year ago :
It depends on the episode. 

Most of them you'll need yarn. I've recently switched to importmaps to make it a bit easier to get going with the source codes.

# in the extracted folder
bundle
yarn
bin/rails db:prepare # or db:migrate db:seed or db:setup
bin/dev

David Kimura PRO said about 1 year ago :
It's also not a bad idea to match the Ruby version. You can typically find this in the Gemfile. If you're using asdf or mise, I'd install that version of Ruby. They're not locked to that version for any particular reason except that's what was set whenever the project was created.

macktastick said about 1 year ago :
Appreciate the immediate response. Following your steps, the code from the lesson in question (latest, #509) it's working fine now. Looks like starting the server with bin/dev was the key! 

Login to Comment
Back to forums