Skip to content

Instantly share code, notes, and snippets.



Last active Mar 25, 2016
What would you like to do?
tmuxinator example for rails development using vim.


Rails CLI configuration using tmuxinator


% gem install tmuxinator
% export EDITOR=vim


% mux rails
# ~/.tmuxinator/rails.yml
name: railsapp
root: ~/railsapp
# Optional tmux socket
socket_name: railsapp
# 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
# 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 railsapp
- kill `cat tmp/pids/`
- editor:
- server:
- pane1:
- kill `cat tmp/pids/`
- cd vagrant
- vagrant up
- sleep 5
- bundle exec rails s
- console:
- pane1:
- sleep 10
- nice -n 20 rails c
- logs:
- pane1:
- sleep 15
- nice -n 20 multitail log/development.log log/test.log
- database:
- pane1:
- sleep 30
- nice -n 20 rails db -p
- rspec:

This comment has been minimized.

Copy link

@zx1986 zx1986 commented Mar 25, 2016

WOW, great sample!
What's the command nice do? why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment