Is there an option to have CircleCI not install Ruby if .rvmrc, .ruby-version or Gemfile is found? We don’t need Ruby installed and it’s unnecessarily lengthening our run times.
It took me forever to find this, but here’s what you want:
echo 'export rvm_install_on_use_flag=0' >> /home/ubuntu/.rvmrc
2 Likes
This option isn’t working for me. We are using Docker, so don’t need Ruby installed. I’ve got the following at the start of our circle.yml:
machine:
services:
- docker
dependencies:
override:
- echo 'export rvm_install_on_use_flag=0' >> /home/ubuntu/.rvmrc
- docker info
However when running this, it installs Ruby - which is what this is supposed to prevent:
$ echo 'export rvm_install_on_use_flag=0' >> /home/ubuntu/.rvmrc
ruby-2.4.1 is not installed - installing.
...
This has been working for me.
My circle.yml
looks like this.
machine
pre:
- echo 'export rvm_install_on_use_flag=0' >> /home/ubuntu/.rvmrc
Putting it in dependencies
might be too late in the process.
1 Like