Permission problem when trying to installing ruby 2.3



I am trying to install ruby 2.3 by running “rvm install 2.3”. However, there is a permission-related problem:

Failed to create the file ruby-2.3.4.tar.bz2.part: Permission denied

I tried running the command appending sudo but it doesn’t work.


The following worked for me, installing rbenv and then ruby-build:
git clone ~/.rbenv
echo ‘export PATH="$HOME/.rbenv/bin:PATH"' >> ~/.bashrc echo 'eval "(rbenv init -)"’ >> ~/.bashrc
exec $SHELL

git clone ~/.rbenv/plugins/ruby-build
echo ‘export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"’ >> ~/.bashrc
exec $SHELL

rbenv install 2.3.0
rbenv global 2.3.0
ruby -v