Skip to content

Instantly share code, notes, and snippets.

@smanolloff
Last active July 4, 2018 11:16
Show Gist options
  • Save smanolloff/54a787f661a3b8b5af10541f5cc5fa2c to your computer and use it in GitHub Desktop.
Save smanolloff/54a787f661a3b8b5af10541f5cc5fa2c to your computer and use it in GitHub Desktop.
MacOS: optimize RVM ruby in Sublime Text 3
#!/bin/sh
rvmdir="$HOME/.rvm"
rubyversion=$(${rvmdir}/bin/rvm-auto-ruby -e 'puts ENV.fetch("RUBY_VERSION")')
export PATH="${rvmdir}/gems/${rubyversion}/bin"\
":${rvmdir}/gems/${rubyversion}@global/bin"\
":${rvmdir}/rubies/${rubyversion}/bin"\
":${rvmdir}/bin"\
":$PATH"
export GEM_HOME="${rvmdir}/gems/${rubyversion}"
export GEM_PATH="${rvmdir}/gems/${rubyversion}:${rvmdir}/gems/${rubyversion}@global"
export MY_RUBY_HOME="${rvmdir}/rubies/${rubyversion}"
export RUBY_VERSION="${rubyversion}"
export SUBLIME=true
exec "${0%/*}/Sublime Text" $@
@Startouf
Copy link

@smanolloff your solutions seems to break everytime there's a sublime text update and I have to reapply your patch :S Do you think there would be something less intrusive that could keep working even after an app update ?

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