Ruby on Rails 8 · Maintenance and tools
Run code in the app
Run a Ruby snippet with the app loaded.
bin/rails runner "puts User.count"
Official Ruby on Rails 8 documentation
More maintenance and tools commands
- Edit encrypted credentials
- List TODO comments
- List the middleware stack
- Check autoloading
- Clear temporary files
- Precompile assets
All maintenance and tools commands · Ruby on Rails 8 cheatsheet