Troubleshoot chef-server-ctl ruby exception - server

I just upgraded from Chef 11 to the latest 12.x. Install and upgrade went fine, other than having to remove a ref to redis in a config file. However:
chef-server-ctrl user-create
...barfs with this error:
/opt/opscode/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `require': cannot load such file -- chef/knife/ec_base (LoadError)
from /opt/opscode/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
from /opt/opscode/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/knife-ec-backup-2.0.6/lib/chef/knife/ec_backup.rb:2:in `<top (required)>'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:100:in `load'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:100:in `block in load_commands'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:100:in `each'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:100:in `load_commands'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:110:in `load_command'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:124:in `command_class_from'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife.rb:153:in `subcommand_class_from'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife.rb:214:in `run'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/application/knife.rb:148:in `run'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/bin/knife:25:in `<top (required)>'
from /opt/opscode/embedded/bin/knife:23:in `load'
from /opt/opscode/embedded/bin/knife:23:in `<main>'
It seems a file got hosed, somehow. ??? I can't find a way to verify all dependencies were installed during the upgrade, or to do a dependencies-only reinstall. What might cause this?

It turns out that trying to debug this issue when you have no clue how many older version of Chef are overlapped in the installation is a useless exercise. Nothing in Chef will try to resolve the dependencies, and the installs for upgrades always assume you want to keep all your old, obsolete stuff. The solution was to make a full backup, then delete every trace of anything related to Chef, then install all the components again and follow the instructions to restore the backup.

Related

Cocoapods compatibility error - Error running pod install

Many similar questions have been asked here and on Github but none of the solutions worked for me. I've been scratching my head off for this error, if you have any leads, do help.
When running my app, with firebase authentication, this is what I get
[!] CocoaPods could not find compatible versions for pod "cloud_firestore":
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)
Specs satisfying the `cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)` dependency were found, but they required a higher minimum deployment target.
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1074:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error running pod install
Error launching application on iPhone 12.
I tried removing the Podfile, uncommenting the "version: '9.0'" in the Podfile, flutter clean, and everything but nothing worked. What am i exactly doing wrong?
as mentioned in the ios documentation of FlutterFire (which should be more highlighted), FlutterFire supports an iOS deployment target of 10 or higher, in line with the requirements of the underlying firebase-ios-sdk.
the solution, is to follow what the instructions here, and set the deployment target to 10.
do not forget to run a flutter clean after the changes.

MacOS BigSur error on Cocoapods after using a geolocation plugin on Flutter on Android studio

I am new to coding and needed help with an app im making through a tutorial. I was making a climate app which needs the location of the user. I got this error and have no idea what I should do. Someone please help.
LoadError - dlsym(0x7fc11105fd10, Init_ffi_c): symbol not found - /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/lib/ffi_c.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/lib/ffi.rb:6:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/lib/ffi.rb:3:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ethon-0.12.0/lib/ethon.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:74:in `cdn_url?'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:36:in `create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:21:in `find_or_create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:178:in `block in sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:177:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:177:in `sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1073:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
```
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=dlsym%280x7fc11105fd10%2C+Init_ffi_c%29%3A+symbol+not+found+-+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.14.2%2Flib%2Fffi_c.bundle&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
Found no similar issues. To create a new issue, please visit:
https://github.com/cocoapods/cocoapods/issues/new
Error running pod install
Error launching application on iPhone 11 Pro Max.
Please help me.
first make sure that your Cocoapods is installed.
run on your terminal
brew install ruby
2.than install Cocoapods with sudo gem install Cocoapods
pod install
After that open your Flutter project and type "flutter pub get" and after that "flutter clean". This should resolve Your problems.
If this solution did not fix your problem, leave a comment, I will try to help

Podfile won't update after mac update to Catalina, Reason: image not found

I recently updated my mac to Catalina and since, the Podfile for one of my projects is crashing when I try to install/update it (the Podfile).
Traceback (most recent call last):
20: from /usr/local/bin/pod:23:in `<main>'
19: from /usr/local/bin/pod:23:in `load'
18: from /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.9.1/bin/pod:36:in `<top (required)>'
17: from /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
16: from /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
15: from /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.9.1/lib/cocoapods.rb:17:in `<top (required)>'
14: from /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.9.1/lib/cocoapods.rb:75:in `<module:Pod>'
13: from /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
12: from /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
11: from /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.9.1/lib/cocoapods/core_overrides.rb:1:in `<top (required)>'
10: from /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
9: from /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
8: from /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.9.1/lib/cocoapods/sources_manager.rb:5:in `<top (required)>'
7: from /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
6: from /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
5: from /usr/local/lib/ruby/gems/2.5.0/gems/typhoeus-1.3.1/lib/typhoeus.rb:1:in `<top (required)>'
4: from /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
3: from /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
2: from /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/digest/sha2.rb:14:in `<top (required)>'
1: from /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': dlopen(/usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/x86_64-darwin17/digest/sha2.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
Referenced from: /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/x86_64-darwin17/digest/sha2.bundle
Reason: image not found - /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/x86_64-darwin17/digest/sha2.bundle
What I understand from this traceback message is that the reference for one of the files is not correct but I'm not sure how to fix this. I tried boiling down my Podfile to the essentials but the error still persists. This is the Podfile:
# Uncomment the next line to define a global platform for your project
platform :ios, '13.2'
target 'ShoeSwiperMenus' do
end
I tried following this step by step process thinking it could help but it didn't.
When running sudo gem install cocoapods, I get the following error:
ERROR: Loading command: install (LoadError)
dlopen(/usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/x86_64-darwin17/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/x86_64-darwin17/openssl.bundle
Reason: image not found - /usr/local/Cellar/ruby/2.5.3/lib/ruby/2.5.0/x86_64-darwin17/openssl.bundle
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
Any help would be appreciated! Thank you
Thanks to #matt, I solved this pretty quickly. As he pointed out, my ruby was broken. These are the steps I took to solve this:
Install the Ruby Version Manager rvm: curl -L https://get.rvm.io | bash -s stable
Install the latest version of Ruby: rvm install ruby-[version]
In my case this was: rvm install ruby-2.7
Then: rvm use ruby-2.7
And:
sudo gem uninstall cocoapods
sudo gem install -n /usr/local/bin cocoapods

What should I do to use local development?

When I clone the project from https://github.com/daattali/beautiful-jekyll.git on my computer, I use jekyll serve to start the project, but it will some error, what should I do if I want to Local development using jekyll?
the error is:
WARN: Unresolved specs during Gem::Specification.reset:
jekyll-watch (~> 1.1)
rouge (< 3, >= 1.7)
rb-fsevent (>= 0.9.4, ~> 0.9)
rb-inotify (>= 0.9.7, ~> 0.9)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:313:in `check_for_activated_spec!': You have already activated public_suffix 3.0.1, but your Gemfile requires public_suffix 2.0.5. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:31:in `block in setup'
from C:/Ruby24-x64/lib/ruby/2.4.0/forwardable.rb:229:in `each'
from C:/Ruby24-x64/lib/ruby/2.4.0/forwardable.rb:229:in `each'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:26:in `map'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-`enter code here`1.16.0/lib/bundler/runtime.rb:26:in `setup'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler.rb:107:in `setup'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/plugin_manager.rb:50:in `require_from_bundler'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/exe/jekyll:11:in `<top (required)>'
from C:/Ruby24-x64/bin/jekyll:23:in `load'
from C:/Ruby24-x64/bin/jekyll:23:in `<main>'
I have solved my question.
First: you should add the code to your Gemfile file.
the code is
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
Then: you use bundle exec jekyll serve to start. After that you can use local development.

Building Ember.js Fails

I pulled the latest source from github.
I'm trying to build:
stephan#E6520:~/dev/ember.js$ rake
rake aborted!
no such file to load -- net/github-upload
the trace:
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `load'
.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `<main>'
github upload seemed to be missing so
I installed github-upload using the following:
rvm install github-upload --with-openssl-dir=$rvm_path/usr
But i keep having the same error.
I had same issue, try to execute "bundle install" and then "rake" again (hope I remember correctly)
I removed github-upload requirement in the RakeFile.
Then I got other 'errors' i could solve again. By running the suggested bundle install
And now emberjs Builds.