Trying to install ruby ​​through rvm. I installed rvm myself.

pi@raspberrypi:~ $ rvm -v rvm 1.26.11 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/] 

Now I install ruby, gives an error

 pi@raspberrypi:~ $ rvm install ruby Searching for binary rubies, this might take some time. No binary rubies available for: debian/8/armhf/ruby-2.2.1. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Not enough space (297MB) to install ruby (440MB). 

There is enough disk space. What is my problem?

UPDATE:

Mount command:

 pi@raspberrypi:~ $ mount /dev/mmcblk0p2 on / type ext4 (rw,noatime,data=ordered) devtmpfs on /dev type devtmpfs (rw,relatime,size=469748k,nr_inodes=117437,mode=755) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,relatime) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd- cgroups-agent,name=systemd) cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct) debugfs on /sys/kernel/debug type debugfs (rw,relatime) mqueue on /dev/mqueue type mqueue (rw,relatime) configfs on /sys/kernel/config type configfs (rw,relatime) /dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro) 

Df -h command:

 pi@raspberrypi:~ $ df -h Filesystem Size Used Avail Use% Mounted on /dev/root 1.3G 882M 310M 75% / devtmpfs 459M 0 459M 0% /dev tmpfs 463M 0 463M 0% /dev/shm tmpfs 463M 6.2M 457M 2% /run tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 463M 0 463M 0% /sys/fs/cgroup /dev/mmcblk0p1 60M 20M 41M 34% /boot 

Lsblk command:

 pi@raspberrypi:~ $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT mmcblk0 179:0 0 15G 0 disk ├─mmcblk0p1 179:1 0 60M 0 part /boot └─mmcblk0p2 179:2 0 1.3G 0 part / 
  • ruby interpreter is better to install using the package manager of your distribution. but if you want to do this in such an unusual way as in the question, then read carefully the last line about the lack of disk space. - aleksandr barakin
  • there is a big suspicion that you already have the ruby interpreter package. but if not, you can install it with the $ sudo apt-get install ruby command (if, of course, you have enough disk space). - aleksandr barakin
  • Can I mount and df exhaust -h? - don Rumata
  • @alexanderbarakin is better only for those who only need Ruby to run already written software. For developers, RVM and rbenv are more optimal, since they allow you to have several versions, the ability to install new ones automatically (i.e., with a single command, including directly from the repository) and can install non-MRI implementations. - D-side
  • Added everything that shows mount, df -h, lsblk - Pavel

2 answers 2

All honest, you really do not have enough space :)

The question is not related to Rails or Ruby at all, it is even weakly connected with Linux. It is associated with the installation features of the operating system on the Raspberry Pi.

The main way accepted in the community is to fill in the image on the SD card, "blindly" using dd (and analogs). But we must understand that flooding the image in this way will write as many bytes as there are in the image. Therefore, the total capacity of the card, if nothing is done, will be cut to the size of the image. In this case, both the table of sections and the contents of the sections themselves, including the free space, are written to the card. Yes, the image includes free disk space! Therefore, the image is usually compressed before publication so that this “free space” does not have to be downloaded.

In the lsblk exhaust lsblk can see that the card has 15 gigabytes, and the sections are only 1.3 gigabytes (root) and 60 megabytes (bootloader). And in the df -h exhaust you can see that only 310 megabytes are left on the root partition.

Take any partition editor (I use the graphical gparted myself) and expand the main partition (which is 1.3 GB) to the edge of the card .

    The problem was that when you write an OS image on a USB flash drive using Win32 Disk Imager, its entire volume is lost (there were 16 GB left 50 MB), it is solved with https://www.raspberrypi.org/documentation/configuration/raspi-config. md

    • That's right, Win32 Disk Imager does the same as dd . - D-side