Ruby gem permission denied /var/lib/gems using Ubuntu

Viewed 35632

I'm trying to install Rails using Gem and did the following from the terminal:

sudo apt-get install ruby-full build-essential
sudo apt-get install rubygems
export PATH=/var/lib/gems/1.8/bin:$PATH
gem install rails

Then I get the following message:

ERROR: While executing gem ... (Errno:EACCES) Permission denied - /var/lib/gems

I've followed the instruction from Ubuntu Help Guide & I'm using Oracle VM VirtualBox to run Ubuntu under Windows 7 and have RubyGems v1.8.15.

1 Answers
Related