Can't download Ruby version 2.3.0 on cloud 9 ide


#1

Hey guys so i am extremely new at this and wanting to learn, im currently doing a course online and i have been told to use this – rvm install 2.3.0 to install ruby 2.3.0, when i type that code in i get this error

ec2-user:~/environment $ rvm install 2.3.0
Searching for binary rubies, this might take some time.
No binary rubies available for: amazon/2018.03/x86_64/ruby-2.3.0.
Continuing with compilation. Please read ‘rvm help mount’ to get more information on binary rubies.
Checking requirements for amazon.
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.3.0, this may take a while depending on your cpu(s)…
ruby-2.3.0 - #downloading ruby-2.3.0, this may take a while depending on your connection…
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0Warning: Failed to create the file ruby-2.3.0.tar.bz2.part: Permission denied
0 13.5M 0 2498 0 0 6244 0 0:37:51 --:–:-- 0:37:51 6260
curl: (23) Failed writing body (0 != 2498)
There was an error(23).
Checking fallback: https://ftp.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.bz2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- 0:00:01 --:–:-- 0Warning: Failed to create the file ruby-2.3.0.tar.bz2.part: Permission denied
0 13.5M 0 16149 0 0 12517 0 0:18:53 0:00:01 0:18:52 12508
curl: (23) Failed writing body (0 != 16149)
There was an error(23).
Failed download
There has been an error fetching the ruby interpreter. Halting the installation.

i have researched it a bit but can’t find anyone else with a similar issue, is there something simple i am missing or have i stuffed it up? Sorry i’m not sure what else i can put down to help


#2

Hey, I don’t know if you have already moved on, but this worked for me. Please take all necessary precaution because I too am still learning. :slight_smile: Worst case scenario you can always start a new instance. I’m hoping this helps anyone else as well that may run into this problem since it’s a bit weird to troubleshoot.

In your EC2 instance, make sure you are at your environment level by typing in:
cd environment

Now your path should be something like:
ec2-user:~/environment $

Go ahead and now type:
rvm group add rvm $USER

It should prompt you saying:
Adding user ‘ec2-user’ to the group ‘rvm’

Once this has happened, type in:
rvm fix-permissions

Finally, reboot the instance by going to the EC2 Management console. This should have given you the necessary permissions to get rid of that pesky error that we were running into. You should now be able to type in:
rvm install 2.3.0

I hope this helps! I know it gets discouraging to get halted right off the bat. Keep at it!

  • Jake

Sources: https://stackoverflow.com/questions/26242712/installing-rvm-getting-error-there-was-an-error23


#3

Super helpful! For those wondering how to “reboot the instance,” delete the old terminal and open a new terminal.