livinginthepast / ipaddr_extensions

Adds the ipaddr_extensions gem to your chef run
4 stars 2 forks source link

ERROR: Could not locate Gemfile #2

Open sagar1730 opened 8 years ago

sagar1730 commented 8 years ago

I have include this cookbook from my cookbook and used node['privateaddress'] in it to retrieve private ip, but when I ran this thing on AWS it was throwing following error.

1: begin

2: require 'ipaddr_extensions'

3: rescue LoadError

4: if Gem.respond_to?(:install)

5: begin

6>> Gem.install 'ipaddr_extensions'

7: rescue LoadError

8: # RubyGems >= 2.3.0, <= 2.5.0 raises a new LoadError even when successful

9: raise if Gem.rubygems_version >= Gem::Version.new('2.5.0')

10: end

11: else

12: require 'rubygems/commands/install_command'

13: cmd = Gem::Commands::InstallCommand.new

14: cmd.handle_options %w(--no-ri --no-rdoc ipaddr_extensions)

15:

[2016-01-06T09:11:53+00:00] ERROR: Running exception handlers

[2016-01-06T09:11:53+00:00] ERROR: Exception handlers complete

[2016-01-06T09:11:53+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out

[2016-01-06T09:11:53+00:00] ERROR: Could not locate Gemfile

[2016-01-06T09:11:53+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Can you correct me what I am missing.

sax commented 8 years ago

What version of Chef are you using? Also, can you check which version of rubygems you are using?

sagar1730 commented 8 years ago

I am using Chef 11 on AWS Opswork. I am not sure rubygems version as I am not having control for that instance right now. I will check it soon, but which version should I need to install with Chef 11.