Skip to content

Instantly share code, notes, and snippets.

@matsubo
Last active March 22, 2017 15:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matsubo/3497567deb32c98c0f3bcefdfb6241d6 to your computer and use it in GitHub Desktop.
Save matsubo/3497567deb32c98c0f3bcefdfb6241d6 to your computer and use it in GitHub Desktop.
configuration for tmuxinator rails project
# ~/.tmuxinator/rails.yml
name: rails_project
root: ~/Documents/rails_repository/
# Optional tmux socket
socket_name: rails
# Runs before everything. Use it to start daemons etc.
# pre: sudo /etc/rc.d/mysqld start
# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions.
# pre_window: rbenv shell 2.0.0-p247
#pre_window: export OPENTOK_API_KEY=45193662; export OPENTOK_SECRET=fa4c067a2618d44d39138c8e5401acc19e2140d9
# Pass command line options to tmux. Useful for specifying a different tmux.conf.
# tmux_options: -f ~/.tmux.mac.conf
# Change the command to call tmux. This can be used by derivatives/wrappers like byobu.
# tmux_command: byobu
# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used.
# startup_window: logs
# Controls whether the tmux session should be attached to automatically. Defaults to true.
# attach: false
# Runs after everything. Use it to attach to tmux with custom options etc.
# post: tmux -CC attach -t rails
post:
- kill `cat tmp/pids/server.pid`
windows:
- editor:
- server:
panes:
- pane1:
- kill `cat tmp/pids/server.pid`
- bundle exec rails s
- pane1:
- kill `cat tmp/pids/sidekiq.pid`
- bundle exec sidekiq
- console:
panes:
- pane1:
- sleep 10
- nice -n 20 rails c
- logs:
panes:
- pane1:
- sleep 15
- nice -n 20 multitail log/development.log log/test.log
- database:
panes:
- pane1:
- sleep 30
- nice -n 20 rails db -p
- rspec:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment