Skip to content


Just adding rbenv support #45

wants to merge 2 commits into from

Added rbenv support, in a similar way rvm was done; new sample file in assets added for additional specs


+1 Please pull


yes. please merge this pull request.


:+1: can this be merged?


This would be awesome to have. If you need any help maintaining this project, do let me know.




Why is this still not merged?


I'm thinking it may be abandonware. @aziz could be very busy on something else.

@Soliah Soliah added a commit that referenced this pull request
@Soliah Soliah [Closes #45, #36] Add support for rbenv. 6429f80

yeah, would be nice to have this. is tmuxinator abandoned?


Is someone willing to fork it, integrate all the pulls and add it as a new gem to


@aziz Would you no longer maintain this project?

tmuxinator member

I tried several times to find some time for this project but I failed, but don't worry now I found a collaborator.
Starting this week @franciscoj is helping me maintaining Tmuxinator. So stay tuned for a lot of new features and , finally, merging some of those old pull requests.


That's great news! :+1:


@aziz @franciscoj Last commit: 7 months ago :pensive:


@danielbayerlein I know :( And I'm sorry. Just when @aziz told me I could give him a hand with it I got quite a lot more load from work and home and I need to organize before I can go with this.

In the meantime, there's an error on master which prevented me from being able to merge anything. If anybody can send a pull requests to fix it. Everything would be much more smooth and I could start merging all the amazing pull requests that the comunity has already sent.




In the meantime, there's an error on master which prevented me from being able to merge anything. If anybody can send a pull requests to fix it.

Can you tell me more about the error in a new issue?

tmuxinator member

I've managed to rebase this and #79 on top of master and have been using my fork successfully with rbenv. Have a look at #96.


@danielbayerlein it doesn't matter the layout or panes I load, I get only one pane and 1 window.

However, the rebase from @Soliah seems to fix this for some reason.

I'm merging the @Soliah rebase (which includes some more things).

Thanks a lot @matthutchinson for your work :+1:

@franciscoj franciscoj closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 29, 2011
  1. @matthutchinson
Commits on Mar 19, 2012
  1. @matthutchinson
Showing with 49 additions and 5 deletions.
  1. +0 −1 Gemfile
  2. +0 −1 Gemfile.lock
  3. +22 −0 lib/tmuxinator/assets/rbenv_sample.yml
  4. +8 −3 lib/tmuxinator/config_writer.rb
  5. +1 −0 spec/spec_helper.rb
  6. +18 −0 spec/tmuxinator_spec.rb
1 Gemfile
@@ -2,7 +2,6 @@ source ""
group :development do
gem "rspec", "~> 2.6.0"
- gem "bundler", "~> 1.1.rc"
gem "jeweler", "~> 1.6.4"
gem "rcov", "~> 0.9.10"
1 Gemfile.lock
@@ -22,7 +22,6 @@ PLATFORMS
- bundler (~> 1.1.rc)
jeweler (~> 1.6.4)
rcov (~> 0.9.10)
rspec (~> 2.6.0)
22 lib/tmuxinator/assets/rbenv_sample.yml
@@ -0,0 +1,22 @@
+# ~/.tmuxinator/<%= @name %>.yml
+# you can make as many tabs as you wish...
+project_name: Tmuxinator
+project_root: ~/code/rails_project
+socket_name: foo # Not needed. Remove to use default socket
+rbenv: 1.9.2-p290
+pre: sudo /etc/rc.d/mysqld start
+ - editor:
+ layout: main-vertical
+ panes:
+ - vim
+ - #empty, will just run plain bash
+ - top
+ - shell: git pull
+ - database: rails db
+ - server: rails s
+ - logs: tail -f logs/development.log
+ - console: rails c
+ - capistrano:
+ - server: ssh me@myhost
11 lib/tmuxinator/config_writer.rb
@@ -1,7 +1,7 @@
module Tmuxinator
class ConfigWriter
- attr_accessor :file_name, :file_path, :project_name, :project_root, :rvm, :tabs, :pre, :settings, :hotkeys
+ attr_accessor :file_name, :file_path, :project_name, :project_root, :rvm, :tabs, :pre, :settings, :hotkeys, :rbenv
include Tmuxinator::Helper
@@ -52,6 +52,7 @@ def process_config!
@project_name = yaml["project_name"]
@project_root = yaml["project_root"]
@rvm = yaml["rvm"]
+ @rbenv = yaml["rbenv"]
@pre = build_command(yaml["pre"])
@tabs = []
@socket_name = yaml['socket_name']
@@ -103,8 +104,12 @@ def ensure_list(value)
def build_command(value, rvm_prepend=true)
commands = ensure_list(value)
- if @rvm && rvm_prepend
- commands.unshift "rvm use #{@rvm}"
+ if rvm_prepend
+ if @rbenv
+ commands.unshift "rbenv shell #{@rbenv}"
+ elsif @rvm
+ commands.unshift "rvm use #{@rvm}"
+ end
commands.join ' && '
1 spec/spec_helper.rb
@@ -8,6 +8,7 @@
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
SAMPLE_CONFIG = File.join(File.dirname(__FILE__), '..', 'lib', 'tmuxinator', 'assets', 'sample.yml')
+RBENV_SAMPLE_CONFIG = File.join(File.dirname(__FILE__), '..', 'lib', 'tmuxinator', 'assets', 'rbenv_sample.yml')
RSpec.configure do |config|
18 spec/tmuxinator_spec.rb
@@ -59,4 +59,22 @@
specify{ third_tab.panes.should be_an Array }
specify{ third_tab.pre.should eql "rvm use 1.9.2@rails_project && echo 'I get run in each pane.' && echo 'Before each pane command!'"}
+ context "with rbenv configured" do
+ before do
+ subject.file_path = RBENV_SAMPLE_CONFIG
+ end
+ its(:rbenv){ should eql '1.9.2-p290' }
+ let(:first_tab){ subject.tabs[0] }
+ it "should prepend each pane with the rbenv string" do
+{|p| p.split(/ && /)[0] }.should eql ["rbenv shell 1.9.2-p290"] * 3
+ end
+ let(:second_tab){ subject.tabs[1] }
+ specify{ eql "shell" }
+ specify{ second_tab.command.should eql "rbenv shell 1.9.2-p290 && git pull"}
+ end
Something went wrong with that request. Please try again.