Permission problem when trying to installing ruby 2.3

rails

#1

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.


#2

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

git clone https://github.com/rbenv/ruby-build.git ~/.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