Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install Ruby via RVM without confirmation prompt

Tags:

ruby

rvm

puppet

I use Puppet to install Ruby via RVM and was working fine until very recently (last few days or so).

I think its due to rvm wanting me to "press any key to continue". Is there anyway to force "yes" this, I've tried --force but no luck. Thanks

[root@local ~]# rvm install --binary --verify-downloads 1 ruby-1.9.3-p362
Searching for binary rubies, this might take some time.
Installing requirements for unknown, might require sudo password.
Always update your system first!
/bin/bash
/usr/bin/curl
which: no git in (/usr/local/rvm/gems/ruby-1.9.3-p362/bin:/usr/local/rvm/gems/ruby-1.9.3-p362@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p362/bin:/usr/local/rvm/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/aws/bin)
/usr/bin/patch
Install: git
Install: build-essential openssl libreadline zlib1g libyaml libsqlite3 sqlite3 libxml2 libxslt autoconf libc6 libgdbm ncurses automake libtool bison pkg-config
press any key to continue
like image 216
user1741694 Avatar asked Jan 28 '26 07:01

user1741694


1 Answers

Try:

$ yes | rvm install --binary --verify-downloads 1 ruby-1.9.3-p362

From yes's man page:

Repeatedly output a line with all specified STRING(s), or ‘y’.

like image 182
Arie Xiao Avatar answered Jan 30 '26 21:01

Arie Xiao