- Follow the instructions to install rbenv system-wide (for Vagrant support you do it in the box):
# create user and groups for rbenv
useradd -U rbenv || true
usermod -G rbenv -a vagrant # add vagrant to rbenv group; discard if you are not using Vagrant
# install rbenv itself
git clone https://github.com/rbenv/rbenv.git /usr/local/rbenv
cd /usr/local/rbenv && ./src/configure && make -C src || true
# system-wide profile for all users
echo 'export PATH="/usr/local/rbenv/bin:$PATH"' > /etc/profile.d/rbenv.sh
echo 'export RBENV_ROOT="/usr/local/rbenv"' >> /etc/profile.d/rbenv.sh
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh
# add ruby-build plugin
git clone https://github.com/rbenv/ruby-build.git /usr/local/rbenv/plugins/ruby-build
chgrp -R rbenv /usr/local/rbenv
chmod -R g+rwxXs /usr/local/rbenv
# load profile (you may also reload your shell)
source /etc/profile.d/rbenv.sh
# install a required ruby version
rbenv install 2.3.1
rbenv global 2.3.1
# you will need bundler
gem install bundler
# required for RubyMine support
# see: https://www.jetbrains.com/help/ruby/2016.3/rbenv-support.html
ln -s /usr/local/rbenv /home/vagrant/.rbenv
- Bundle your project gems locally -- this may be critical to RubyMine:
bundle install --path vendor/bundle
- Open RubyMine, go to Preferences -> Languages & Frameworks -> Ruby SDK and Gems. Press 'Add', select 'Vagrant', use path to your
ruby
binary underversions/
(notshims/
!). RubyMine should detect your gems. - You are awesome!