Set path

add $(ruby -e 'puts Gem.user_dir')/bin: to your $PATH. You can do this by adding the following line to ~/.bashrc:

PATH="$(ruby -e 'puts Gem.user_dir')/bin:$PATH"

Bundler install to the path

By default, Bundler installs gems system-wide, which is contrary to the behaviour of gem itself on Arch. To correct this, add the following to your ~/.bashrc:

export GEM_HOME=$(ruby -e 'puts Gem.user_dir')


Modify gem sources


gem source -r
gem source -a

Using bundler and Gemfile

source ''
gem 'rails', '4.0.2'