Is it possible that it was installed as root and is now run as non-root (such that permissions don't allow fog to be loaded)? Otherwise I'm not sure from this what might be awry. wes
On Tue, Feb 7, 2017 at 11:34 PM, sreenivas narayan < [email protected]> wrote: > Hello Guys, > > I an using a ruby script which uses fog and json for restarting ec2 > instance. While executing it as root it is working. The script is executed > using ansible playbook. > > === > TASK [Executing restart-bash script] ****************************** > ************* > fatal: [13.55.124.190 -> localhost]: FAILED! => {"changed": true, "cmd": > "/bin/sh /restart-bash.sh", "delta": "0:00:00.346201", "end": "2017-02-07 > 21:23:05.266766", "failed": true, "rc": 1, "start": "2017-02-07 > 21:23:04.920565", "stderr": "/usr/local/rvm/rubies/ruby-2. > 1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in > `require': cannot load such file -- fog (LoadError)\n\tfrom > /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/ > rubygems/core_ext/kernel_require.rb:55:in `require'\n\tfrom > /restart.rb:5:in `<main>'", "stdout": "", "stdout_lines": [], "warnings": > []} > to retry, use: --limit @main.retry > === > > Thanks > Sreenivas > > -- > You received this message because you are subscribed to the Google Groups > "ruby-fog" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "ruby-fog" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
