0

I am following this doc to deploy Cloud Foundry on my OSX on VirtualBox - http://docs.cloudfoundry.org/deploying/boshlite/create_a_manifest.html

When executing

./scripts/generate-bosh-lite-dev-manifest

I got the following prints in console:

WangYudeMacBook-Pro:workspace wangyu$ cd cf-release/
WangYudeMacBook-Pro:cf-release wangyu$ ./scripts/generate-bosh-lite-dev-manifest 
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/setup (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/setup (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'

Can only target Bosh Lite Director. Please use 'bosh target' before running this script.

Anyone knows what happened? run the script with sudo did not change the result.

Thanks much for the help!

Eddie
  • 9,696
  • 4
  • 45
  • 58
  • I found this error was printed when executing the line "BOSH_STATUS=$(bosh status)" in script generate-bosh-lite-dev-manifest. So it looks like "$(bosh status)" can not be run in the script. But when I ran "bosh status" in the terminal of OSX, it is running correctly and shows the right information. – Charlie Wang Feb 03 '16 at 01:01
  • This is caused by "export BOSH_USE_BUNDLER=true" in "generate-bosh-lite-dev-manifest" script. After commenting the export line, the "generate-bosh-lite-dev-manifest" can be run successfully. It looks like a bug of BOSH - https://github.com/cloudfoundry/bosh/issues/1063 Need to install bundler and try to see if it works without commenting the line. – Charlie Wang Feb 03 '16 at 18:31
  • Finally, the solution is simple. Just install bundler and then the script will run without the problem. But there is no documentation in cloudfoundry.org for this. – Charlie Wang Feb 03 '16 at 18:43

1 Answers1

0

Please make sure about this pre-requisite mentioned in the docs:

"It assumes you have already setup BOSH-Lite and targeted the Director."

In order to install bosh lite and target the director, please refer to: https://github.com/cloudfoundry/bosh-lite

I hope that helps.

fordaz
  • 101
  • 3
  • Thanks, fordaz! I did do that. After rerun the target Director command and the manifest command I still got the same failure: WangYudeMacBook-Pro:cf-release wangyu$ bosh target 192.168.50.4 lite Target set to `Bosh Lite Director' WangYudeMacBook-Pro:cf-release wangyu$ bosh login Your username: admin Enter password: Logged in as `admin' WangYudeMacBook-Pro:cf-release wangyu$ ./scripts/generate-bosh-lite-dev-manifest /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/setup (LoadError) – Charlie Wang Feb 02 '16 at 17:30