Any idea what im doing wrong i have chefworkstation installed:
$ chef -v
Chef Workstation version: 21.4.365
Chef Infra Client version: 16.12.3
Chef InSpec version: 4.29.3
Chef CLI version: 4.0.0
Chef Habitat version: 1.6.288
Test Kitchen version: 2.11.2
Cookstyle version: 7.10.0
aws cli is installed and i have set up a default credentials that are working (confirmed via deploying some tf code)
Created a folder and ran
inspec init profile --platform aws tftest
Install the aws-sdk for 2.7.3 (Using rbenv) and bundle to install the sdk
Gemfile
source 'https://rubygems.org/' do
gem 'aws-sdk', '~> 3'
end
I then run:
inspec exec tftest -t aws://
and get the below error:
$ inspec exec tftest -t aws://
Traceback (most recent call last):
30: from /usr/bin/inspec:354:in `<main>'
29: from /usr/bin/inspec:354:in `load'
28: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-bin-4.29.3/bin/inspec:11:in `<top (required)>'
27: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/base_cli.rb:35:in `start'
26: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/base.rb:485:in `start'
25: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
24: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
23: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
22: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/cli.rb:281:in `exec'
21: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/runner.rb:135:in `run'
20: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/runner.rb:101:in `load'
19: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/runner.rb:101:in `each'
18: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/runner.rb:107:in `block in load'
17: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/profile.rb:259:in `load_libraries'
16: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/profile.rb:259:in `each_with_index'
15: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/profile.rb:259:in `each'
14: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/profile.rb:278:in `block in load_libraries'
13: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/profile.rb:285:in `load_libraries'
12: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/profile_context.rb:143:in `load_libraries'
11: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/profile_context.rb:143:in `each'
10: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/profile_context.rb:144:in `block in load_libraries'
9: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/profile_context.rb:159:in `load_library_file'
8: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/profile_context.rb:170:in `load_with_context'
7: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/profile_context.rb:170:in `instance_eval'
6: from libraries/aws_alb.rb:3:in `load_with_context'
5: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/dsl_shared.rb:47:in `require'
4: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/dsl_shared.rb:47:in `eval'
3: from libraries/aws_backend.rb:13:in `create'
2: from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.29.3/lib/inspec/dsl_shared.rb:33:in `require'
1: from /opt/chef-workstation/embedded/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
/opt/chef-workstation/embedded/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require': cannot load such file -- aws-sdk-ecrpublic (LoadError)
I tried updating my Gemfile to include gem 'aws-sdk-ecrpublic' but i still get the same error
folder layout is:
.
├── Gemfile
├── Gemfile.lock
├── README.md
├── .ruby-version
└── tftest
├── controls
│ └── example.rb
├── inspec.lock
├── inspec.yml
└── README.md
Any idea whats wrong?
its a very late answer to this question but inspec-aws has dependency on train-aws which need to be installed. https://github.com/inspec/train-aws
Related
I just installed chef-workstation on mac, I also have rvm installed on my machine. The chef-workstation is successfully installed but when I try to run chef exec command it fails with below error -
Traceback (most recent call last):
20: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/bin/ruby_executable_hooks:22:in `<main>'
19: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/bin/ruby_executable_hooks:22:in `eval'
18: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/bin/chef:23:in `<main>'
17: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/bin/chef:23:in `load'
16: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/bin/chef:25:in `<top (required)>'
15: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/cli.rb:73:in `run'
14: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/command/base.rb:58:in `run_with_default_options'
13: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/command/env.rb:39:in `run'
12: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/command/env.rb:39:in `tap'
11: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/command/env.rb:41:in `block in run'
10: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/command/env.rb:57:in `ruby_info'
9: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/command/env.rb:57:in `tap'
8: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/command/env.rb:60:in `block in ruby_info'
7: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/command/env.rb:60:in `tap'
6: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/command/env.rb:63:in `block (2 levels) in ruby_info'
5: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/command/env.rb:69:in `gem_environment'
4: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/command/env.rb:69:in `tap'
3: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/command/env.rb:70:in `block in gem_environment'
2: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/helpers.rb:124:in `omnibus_env'
1: from /Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/helpers.rb:72:in `omnibus_embedded_bin_dir'
/Users/tusharhawaldar/.rvm/gems/ruby-2.6.0#base/gems/chef-dk-3.11.3/lib/chef-dk/helpers.rb:142:in `omnibus_expand_path': Can not find omnibus installation directory for Chef. (ChefDK::OmnibusInstallNotFound)
When I checked for omnibus_root path it is giving -
/Users/tusharhawaldar/.rvm/rubies
And it is trying to find bin & /embedded/bin directories at omnibus_root_path, which are not present there, so it is raising this error.
I manually created these directories at omnibus_root_path, and I can now run the chef exec command, but when it run the chefspec it is now giving below error -
An error occurred while loading ./spec/unit/recipes/initial_packages_spec.rb.
Failure/Error: require 'chefspec'
LoadError:
cannot load such file -- chefspec
./spec/spec_helper.rb:1:in `<top (required)>'
./spec/unit/recipes/initial_packages_spec.rb:1:in `<top (required)>'
No examples found.
require 'chefspec' is failing means something missing in setup, which I doubt is related to chef omnibus.
What should be the correct way to resolve error related to ChefDK::OmnibusInstallNotFound?
Okay, so after trying various things, I finally found a solution for error -
Can not find omnibus installation directory for Chef. (ChefDK::OmnibusInstallNotFound)
And it is running below command for path update -
echo 'export PATH="/opt/chef-workstation/embedded/bin:$PATH"' >> ~/.bash_profile && source ~/.bash_profile
From - https://www.tutorialspoint.com/chef/chef_workstation_setup.htm
The Omnibus Chef will install Ruby and all the required Ruby gems into /opt/chef/embedded by adding /opt/chef/embedded/bin directory to the .bash_profile file.
these days, I have tried to build my github blog using a minimal-mistakes theme.
at the last Quick guide there are saying
bundle exec jekyll serve
results
`find_name': undefined method `stubs_for' for Gem::Specification:Class (NoMethodError)
specific
C:\Users\all7j\Documents\project\elephantoid.github.io>bundle exec jekyll serve
Traceback (most recent call last):
21: from C:/Ruby26-x64/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:55:in `require'
20: from C:/Ruby26-x64/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:55:in `require'
19: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/setup.rb:10:in `<top (required)>'
18: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/ui/shell.rb:88:in `silence'
17: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/ui/shell.rb:136:in `with_level'
16: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/setup.rb:10:in `block in <top (required)>'
15: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler.rb:149:in `setup'
14: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:20:in `setup'
13: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:101:in `block in definition_method'
12: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:226:in `requested_specs'
11: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:237:in `specs_for'
10: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:170:in `specs'
9: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:258:in `resolve'
8: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:268:in `index'
7: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/index.rb:11:in `build'
6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:271:in `block in index'
5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:271:in `each'
4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:273:in `block (2 levels) in index'
3: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/source/metadata.rb:7:in `specs'
2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/index.rb:11:in `build'
1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/source/metadata.rb:28:in `block in specs'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/rubygems_integration.rb:623:in `find_name': undefined method `stubs_for' for Gem::Specification:Class (NoMethodError)
Did you mean? stubs
I can't find what the stubs_for.
and I don't know what is the problem...
I just follow the Quick guide steps.
I had install gem, ruby, bundler on windows.
and fork GitHub, update _config.yml and more things...
I had a similar case which was brought to me through passenger.log:
[ 2020-12-07 20:13:44.4960 18738/7f0b659e8700 agents/HelperAgent/RequestHandler.h:2306 ]: [Client 19] Cannot checkout session because a spawning error occurred. The identifier of the error is e907d6aa. Please see earlier logs for details about the error.
App 19579 stdout:
App 19579 stdout:
[ 2020-12-07 20:13:54.2571 18738/7f0b67e7c700 Pool2/Implementation.cpp:287 ]: Could not spawn process for application /data/appname/current: An error occured while starting up the preloader.
Error ID: 61ed637e
Error details saved to: /tmp/passenger-error-x96ujc.html
Message from application: undefined method `stubs_for' for Gem::Specification:Class (NoMethodError)
In my case it was a rubygems version change. Depending on your application and expected version you'd like to replace it appropriately below:
gem install -v 2.7.7 rubygems-update && gem update --system 2.7.7
You may also want to uninstall previous rubygems-update prior to re-installation:
gem uninstall rubygems-update
Select gem to uninstall:
1. rubygems-update-2.4.8
2. rubygems-update-2.6.13
3. All versions
> 3
Successfully uninstalled rubygems-update-2.4.8
Remove executables:
update_rubygems
in addition to the gem? [Yn] y
Removing update_rubygems
Successfully uninstalled rubygems-update-2.6.13
and a cleanup of the corresponding folder:
rm -f /usr/local/bin/update_rubygems
You'd like to translate those to your windows machine locations/commands
I have tried a few different techniques from posts excruciatingly similar to mine, but nothing seems to work.
I am currently running Jekyll 4.0.0, and I have not even gotten to connecting it to github pages. I'm using a tutorial by Mike Dane, and I've followed it to the letter. It's an older tutorial so I assume there have been changes.
I have tried reverting to an older version of Jekyll, (3.8.3, as recommended in the post I found) but that gave me more errors than I started with.
Here is my current error as I try to run bundle exec jekyll serve
jekyll 3.8.6 | Error: The minimal theme could not be found. Traceback (most recent call last):
23: from C:/Ruby27-x64/bin/jekyll:23:in `<main>'
22: from C:/Ruby27-x64/bin/jekyll:23:in `load'
21: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/exe/jekyll:15:in `<top (required)>'
20: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
19: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
18: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
17: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
16: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
15: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
14: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:93:in `start'
13: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:93:in `each'
12: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:93:in `block in start'
11: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:30:in `process'
10: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:30:in `new'
9: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:23:in `initialize'
8: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:55:in `config='
7: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:439:in `configure_theme'
6: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:439:in `new'
5: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/theme.rb:12:in `initialize'
4: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/theme.rb:19:in `root'
3: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/theme.rb:82:in `gemspec'
2: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/specification.rb:988:in `find_by_name'
1: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/dependency.rb:323:in `to_spec' C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'minimal' (>= 0) among 85 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=C:/Ruby27-x64/lib/ruby/gems/2.7.0;C:/Users/David/.gem/ruby/2.7.0', execute `gem env` for more information
21: from C:/Ruby27-x64/bin/jekyll:23:in `<main>'
20: from C:/Ruby27-x64/bin/jekyll:23:in `load'
19: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/exe/jekyll:15:in `<top (required)>'
18: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
17: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
16: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
15: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
14: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
13: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
12: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:93:in `start'
11: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:93:in `each'
10: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:93:in `block in start'
9: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:30:in `process'
8: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:30:in `new'
7: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:23:in `initialize'
6: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:55:in `config='
5: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:439:in `configure_theme'
4: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:439:in `new'
3: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/theme.rb:12:in `initialize'
2: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/theme.rb:19:in `root'
1: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/theme.rb:81:in `gemspec' C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/theme.rb:84:in `rescue in gemspec': The minimal theme could not be found. (Jekyll::Errors::MissingDependencyException)
Sorry for the big block, but I'm relatively new and not exactly sure what is important. I have verified from multiple tutorials that I've entered the theme into the gem file properly.
I've installed the gem file using `bundle install' and it properly installed it.
I used bundle info jekyll-theme-minimal to install it and have had no luck.
Apologies if there is an identical post to this one, but I have found many with the exact same issue that were solved by something that I had already done. I promise I've searched other posts before making this one.
Note:
Running on Windows 10 Home
gem 3.1.2
ruby 2.7.1p83
doing jekyll -v gives an error, which may be part of the same problem.
Trying to jekyll serve in my project but I have the following issue (with the trance flag -t)
Configuration file: /Users/victor/Documents/Github/vict0rsch/vict0rsch.github.io/_config.yml
Source: .
Destination: ./_site
Incremental build: disabled. Enable with --incremental
Generating...
Traceback (most recent call last):
26: from /usr/local/bin/jekyll:22:in `<main>'
25: from /usr/local/bin/jekyll:22:in `load'
24: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/exe/jekyll:15:in `<top (required)>'
23: from /usr/local/lib/ruby/gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
22: from /usr/local/lib/ruby/gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
21: from /usr/local/lib/ruby/gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
20: from /usr/local/lib/ruby/gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
19: from /usr/local/lib/ruby/gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
18: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
17: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:93:in `start'
16: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:93:in `each'
15: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:93:in `block in start'
14: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:36:in `process'
13: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:65:in `build'
12: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/command.rb:28:in `process_site'
11: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/site.rb:69:in `process'
10: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/site.rb:166:in `read'
9: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/hooks.rb:102:in `trigger'
8: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/hooks.rb:102:in `each'
7: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/hooks.rb:103:in `block in trigger'
6: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets.rb:24:in `block in <top (required)>'
5: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets.rb:24:in `new'
4: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/env.rb:48:in `initialize'
3: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/env.rb:48:in `new'
2: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/manifest.rb:29:in `initialize'
1: from /usr/local/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/manifest.rb:56:in `initialize'
/usr/local/lib/ruby/gems/2.6.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/manifest.rb:58:in `find_directory_manifest': wrong number of arguments (given 2, expected 1) (ArgumentError)
I don't even know where to start investigating from here.
Note that I'm aware and have tried this and that questions.
According to https://github.com/envygeeks/jekyll-assets/issues/622 This is actually a problem with sprockets 4.0.0.
You can fix it by forcing the earlier version in your Gemfile:
gem "sprockets", "~> 3.7"
Then run
bundle install
To fetch the new gem and update your Gemfile.lock
This may not be enough: even with gem "sprockets", "~> 3.7" , using ruby 3.0 made it still fail so I had to downgrade to ruby 2.7.3 using rvm
$ curl -sSL https://get.rvm.io | bash
$ source ~/.rvm/scripts/rvm
$ rvm install 2.7
$ rvm use 2.7
$ bundle install
At first I could use (not bundle exec) jekyll serve without any problem.
Then I started creating a yaml data file (still trying to make it work) and, don't know how, I "lost" the Gemfile and the Gemfile.lock.
When trying to run jekyll serve (with and without bundle exec) I got an error as result. Then I added again the Gemfile and the Gemfile.lock and got this result:
bundle exec jekyll serve
Configuration file: none
Source: /Users/..../Documents/.../My_website/...
Destination: /Users/..../Documents/.../My_website/.../_site
Incremental build: disabled. Enable with --incremental
Generating...
/Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
/Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
/Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
------------------------------------------------
Jekyll 4.0.0 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
Traceback (most recent call last):
29: from /Users/..../.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `<main>'
28: from /Users/..../.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `eval'
27: from /Users/..../.rvm/gems/ruby-2.7.0/bin/jekyll:23:in `<main>'
26: from /Users/..../.rvm/gems/ruby-2.7.0/bin/jekyll:23:in `load'
25: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/exe/jekyll:15:in `<top (required)>'
24: from /Users/..../.rvm/gems/ruby-2.7.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
23: from /Users/..../.rvm/gems/ruby-2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
22: from /Users/..../.rvm/gems/ruby-2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
21: from /Users/..../.rvm/gems/ruby-2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
20: from /Users/..../.rvm/gems/ruby-2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
19: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
18: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `process_with_graceful_fail'
17: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `each'
16: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail'
15: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:36:in `process'
14: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:65:in `build'
13: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:28:in `process_site'
12: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:74:in `process'
11: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:174:in `read'
10: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/reader.rb:19:in `read'
9: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/readers/data_reader.rb:20:in `read'
8: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/readers/data_reader.rb:38:in `read_data_to'
7: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/readers/data_reader.rb:38:in `each'
6: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/readers/data_reader.rb:46:in `block in read_data_to'
5: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/readers/data_reader.rb:66:in `read_data_file'
4: from /Users/..../.rvm/gems/ruby-2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb:157:in `load_file'
3: from /Users/..../.rvm/gems/ruby-2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb:157:in `open'
2: from /Users/..../.rvm/gems/ruby-2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb:157:in `block in load_file'
1: from /Users/..../.rvm/gems/ruby-2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb:143:in `load'
/Users/..../.rvm/gems/ruby-2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb:143:in `parse': (/Users/..../Documents/_VITO/My_website/website2020/_data/audio.yaml): mapping values are
not allowed in this context at line 8 column 11 (Psych::SyntaxError)
The project has a config.yaml and both Gemfile and Gemfile.lock. I don't know what Configuration file: none would mean.
That's what my Gemfile looks like:
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
# gem "rails"
gem "jekyll", "~> 4.0"
I am sure I made pretty much a mess (first timer with Jekyll) and hope you can help me.
bundle add webrick
this worked for me on windows 10
When making changes to the file (index.html), add a blank front matter (two triple-dashed lines at the start of a file ), it will work.
You don't need to see Gemfile at the moment.