Skip to content

Instantly share code, notes, and snippets.

@sambrightman
Last active September 18, 2017 14:29
Show Gist options
  • Save sambrightman/55566c6544b2d3eb4d63e3d6b8e19dfc to your computer and use it in GitHub Desktop.
Save sambrightman/55566c6544b2d3eb4d63e3d6b8e19dfc to your computer and use it in GitHub Desktop.
robe setup for Linuxbrew
;;; Code:
(defun my/shell-command-to-string (command)
"Return output of COMMAND without newline."
(substring (shell-command-to-string command) 0 -1))
(setenv "HOMEBREW_PREFIX" (my/shell-command-to-string "brew --prefix"))
(setenv "HOMEBREW_BREW_FILE" (concat (getenv "HOMEBREW_PREFIX") "/bin/brew"))
(setenv "HOMEBREW_CELLAR" (my/shell-command-to-string "brew --cellar"))
(setenv "HOMEBREW_CACHE" (my/shell-command-to-string "brew --cache"))
(setenv "HOMEBREW_REPOSITORY" (my/shell-command-to-string "brew --repo"))
(setenv "HOMEBREW_LIBRARY" (concat (getenv "HOMEBREW_REPOSITORY") "/Library"))
;; then require('package') in pry buffer
;;; env.el ends here
lib = File.expand_path('../Library/Homebrew', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
source 'https://rubygems.org'
ruby '2.4.0'
#ruby-gemset=linuxbrew
gem 'method_source'
gem 'pry'
gem 'pry-doc'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment