This is a basic Ruby process that randomly chooses a feature film from TMDB's catalogue.
- Make sure
rbenvis installed: https://github.com/rbenv/rbenv#using-package-managers- Install ruby:
rbenv install 3.3.6 - Initialize
rbenv:rbenv init(this can also be exported to your ZSH shell by runningecho 'eval "$(~/.rbenv/bin/rbenv init - zsh)"' >> ~/.zshrc) - Set your working directory to use the just-installed Ruby version:
rbenv local 3.3.6
- Install ruby:
- Make sure
bundleris installed:gem install bundler - Install all dependencies:
bundle install - Start the server:
ruby movietime.rb - Visit http://127.0.0.1:4567
- Click "Begin" (or, alternatively: directly navigate to http://127.0.0.1:4567/movie)
- Viola! A wild movie appears!