Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

From trying to do bundle I get:

$ gem install bundler
Fetching: bundler-1.2.0.gem (100%)
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - /var/lib/gems
share|improve this question

4 Answers 4

up vote 2 down vote accepted

Add this to the bottom of .bashrc

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  # This loads RVM
share|improve this answer

Have you tried executing this as superuser?

sudo gem install bundler

Or, you could try changing the /var/lib/gems modes using chmod.

share|improve this answer

Try this:

sudo apt-get install -y build-essential ruby ruby-dev
sudo env REALLY_GEM_UPDATE_SYSTEM=1 gem update --system
sudo gem install bundler
mkdir ~/test
cd ~/test
echo "source 'https://rubygems.org'" > Gemfile
echo "gem 'rake'" >> Gemfile
bundle install
share|improve this answer

I think that problem comes from the fact that the shell (in the terminal) you are running the bundler in, is not a login shell. Make it a login shell as follows:

bash --login

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.