This feature is a work in progress and should be considered experimental.
Kuby ships with a default environment called "development" that is capable of running your application locally using the copy of Kubernetes that comes with Docker Desktop. Running your app inside a local Kubernetes cluster provides several significant benefits:
- Your development environment more closely mirrors your production environment, leading to (hopefully) fewer configuration issues, etc.
- Kuby can automatically start up a database for your app, obviating the need to run one yourself.
- If you haven't already, install Docker Desktop.
- In Docker Desktop's preferences, click the Kubernetes tab, then check the "Enable Kubernetes" checkbox. It'll take a few minutes to spin up the cluster.
bundle exec kuby rails s. Kuby will prompt you to setup your dev environment.
- Your Rails app should boot. Visit localhost:3000 in your browser as you normally would.
The setup steps above will automatically run
bundle install to install all your gem dependencies inside Kubernetes. If you add or remove a gem afterwards however, You'll need to run
bundle install manually:
Running Rails/Rake Tasks
How Development Works