Skip to content

Commit

Permalink
Fixes rbenv component path in the manifest files
Browse files Browse the repository at this point in the history
Commit bc5a7c6 changed how rbenv is installed
("Use the same Git/GitHub approach for Mac as we do for Linux."),
but was missing the changes in the manifest files.

This commit fixes the corresponding manifest files.
  • Loading branch information
Simon authored and Dan Croak committed Oct 1, 2014
1 parent bc5a7c6 commit f3b85f9
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Manifest.linux
Expand Up @@ -8,7 +8,7 @@ linux-components/debian-package-update
linux-components/debian-derivative-packages
common-components/zsh
linux-components/silver-searcher
linux-components/rbenv
common-components/rbenv
common-components/ruby-environment
linux-components/bundler
common-components/default-gems
Expand Down
2 changes: 1 addition & 1 deletion Manifest.mac
Expand Up @@ -9,7 +9,7 @@ mac-components/zsh-fix
mac-components/homebrew
mac-components/packages
mac-components/start-services
mac-components/rbenv
common-components/rbenv
mac-components/compiler-and-libraries
common-components/ruby-environment
mac-components/bundler
Expand Down
26 changes: 25 additions & 1 deletion linux
Expand Up @@ -118,7 +118,31 @@ if ! command -v ag >/dev/null; then
fi
### end linux-components/silver-searcher

### end linux-components/rbenv
if [[ ! -d "$HOME/.rbenv" ]]; then
fancy_echo "Installing rbenv, to change Ruby versions ..."
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv

if ! grep -qs "rbenv init" ~/.zshrc; then
printf 'export PATH="$HOME/.rbenv/bin:$PATH"\n' >> ~/.zshrc
printf 'eval "$(rbenv init - zsh --no-rehash)"\n' >> ~/.zshrc
fi

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init - zsh)"
fi

if [[ ! -d "$HOME/.rbenv/plugins/rbenv-gem-rehash" ]]; then
fancy_echo "Installing rbenv-gem-rehash so the shell automatically picks up binaries after installing gems with binaries..."
git clone https://github.com/sstephenson/rbenv-gem-rehash.git \
~/.rbenv/plugins/rbenv-gem-rehash
fi

if [[ ! -d "$HOME/.rbenv/plugins/ruby-build" ]]; then
fancy_echo "Installing ruby-build, to install Rubies ..."
git clone https://github.com/sstephenson/ruby-build.git \
~/.rbenv/plugins/ruby-build
fi
### end common-components/rbenv

ruby_version="$(curl -sSL http://ruby.thoughtbot.com/latest)"

Expand Down
26 changes: 25 additions & 1 deletion mac
Expand Up @@ -156,7 +156,31 @@ fancy_echo "Starting Postgres ..."
brew_launchctl_restart postgresql
### end mac-components/start-services

### end mac-components/rbenv
if [[ ! -d "$HOME/.rbenv" ]]; then
fancy_echo "Installing rbenv, to change Ruby versions ..."
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv

if ! grep -qs "rbenv init" ~/.zshrc; then
printf 'export PATH="$HOME/.rbenv/bin:$PATH"\n' >> ~/.zshrc
printf 'eval "$(rbenv init - zsh --no-rehash)"\n' >> ~/.zshrc
fi

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init - zsh)"
fi

if [[ ! -d "$HOME/.rbenv/plugins/rbenv-gem-rehash" ]]; then
fancy_echo "Installing rbenv-gem-rehash so the shell automatically picks up binaries after installing gems with binaries..."
git clone https://github.com/sstephenson/rbenv-gem-rehash.git \
~/.rbenv/plugins/rbenv-gem-rehash
fi

if [[ ! -d "$HOME/.rbenv/plugins/ruby-build" ]]; then
fancy_echo "Installing ruby-build, to install Rubies ..."
git clone https://github.com/sstephenson/ruby-build.git \
~/.rbenv/plugins/ruby-build
fi
### end common-components/rbenv

fancy_echo "Upgrading and linking OpenSSL ..."
brew_install_or_upgrade 'openssl'
Expand Down

0 comments on commit f3b85f9

Please sign in to comment.