0

I am working on a bash server setup script for ubuntu 14.03 LTS. For some of the commands the script is executing, it prompts the user to input 'yes/no' or 'Y/N'. For some of these commands I have been able to pass a flag to the command in question that will auto respond with a yes. For example: sudo apt-get install -y gcc doesn't prompt the user.

On the other hand, I can't seem to find a way to do this for

sudo gem source -a http://rubygems.org/.

It keeps prompting me with Do you want to add this insecure source? [yn].

So far I've tried the following:

yes | gem source -a http://rubygems.org/ which I found here

Any Suggestions?

Community
  • 1
  • 1

1 Answers1

0

First add this certificate via script in this folder: {rubyfolder}\lib\ruby\2.1.0\rubygems\ssl_certs

NPC
  • 841
  • 2
  • 10
  • 18