Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm installing RVM for Ruby with the following command: curl -L | sudo su myuser -c "bash -s stable --rails"

I specifically need it to be installed under that user - and it will work, but it requires the user to intervene by pressing "q" to continue once it hits a certain point in the script. How can I set the script to just continue without having to press 'q' to continue?

share|improve this question
wrap it with expect. – Sirex Jul 31 '12 at 3:38
@Sirex - Thanks, I responded the issue I'm having to hopelessn00b 's answer. – TJ Biddle Jul 31 '12 at 4:08

The installer options --ruby and --rails are intended for humans only, and to allow guided installation.

RVM2 will allow better automation of this process but in RVM1 - you need to do it step by step.

Single user:

curl -L | bash -s stable
apt-get install ... # the steps shown in `rvm requirements`
~/.rvm/bin/rvm install 1.9.3

Multi user:

# create "rvm" group and add users to it
curl -L | sudo bash -s stable
sudo apt-get install ... # the steps shown in `rvm requirements`
/usr/local/rvm/bin/rvm install 1.9.3
share|improve this answer
Upvote for developer response: But we needed automation. When I got in this morning I was told we decided against virtual environments, just using system ruby now, everything works fine and dandy. – TJ Biddle Aug 1 '12 at 1:23
automation will come in RVM2 - fixing stuff or adding features to RVM1 only slows down work on RVM2 - sad but true. – mpapis Aug 1 '12 at 1:33

Expect homepage.

Seems to be the standard "how do I skip keyboard input" answer on SO and a lot of the Linux forums.

share|improve this answer
I'm confused - can I just wrap the entire command in expect or do I need to run this as an expect file with the shebang and all? It seems every time I try to wrap it I run into issues with it thinking I'm passing it a file. I'm setting this up in the postinst file in a debian package and I don't think I can change it from a bash to expect shebang. – TJ Biddle Jul 31 '12 at 4:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.