Bundle can't find gem that is clearly installed - ruby

I'm having a really weird issue in which I can clearly see that a gem file is installed and so can bundle, but then when I try to run it I get an error that bundle can't find it.
Gem File:
source "https://rubygems.org/"
gem 'kitchen-terraform'
Bundle env:
## Environment
```
Bundler 1.16.2
Platforms ruby, x64-mingw32
Ruby 2.5.1p57 (2018-03-29 revision 63029) [x64-mingw32]
Full Path C:/Ruby25-x64/bin/ruby.exe
Config Dir C:/ProgramData
RubyGems 2.7.6
Gem Home C:/Ruby25-x64/lib/ruby/gems/2.5.0
Gem Path C:/Users/rperkins/.gem/ruby/2.5.0;C:/Ruby25-x64/lib/ruby/gems/2.5.0
User Path C:/Users/rperkins/.gem/ruby/2.5.0
Bin Dir C:/Ruby25-x64/bin
Tools
Git 2.7.2.windows.1
RVM not installed
rbenv not installed
chruby not installed
```
## Bundler Build Metadata
```
Built At 2018-05-16
Git SHA 9f7bf0ac3
Released Version true
```
## Gemfile
### Gemfile
```ruby
source "https://rubygems.org/"
gem 'kitchen-terraform'
```
### Gemfile.lock
```
GEM
remote: https://rubygems.org/
specs:
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
aws-sdk (2.11.65)
aws-sdk-resources (= 2.11.65)
aws-sdk-core (2.11.65)
aws-sigv4 (~> 1.0)
jmespath (~> 1.0)
aws-sdk-resources (2.11.65)
aws-sdk-core (= 2.11.65)
aws-sigv4 (1.0.2)
azure_mgmt_resources (0.16.0)
ms_rest_azure (~> 0.10.0)
builder (3.2.3)
coderay (1.1.2)
concurrent-ruby (1.0.5)
declarative (0.0.10)
declarative-option (0.1.0)
diff-lcs (1.3)
digest-crc (0.4.1)
docker-api (1.34.2)
excon (>= 0.47.0)
multi_json
domain_name (0.5.20180417)
unf (>= 0.0.5, < 1.0.0)
dry-configurable (0.7.0)
concurrent-ruby (~> 1.0)
dry-container (0.6.0)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.1, >= 0.1.3)
dry-core (0.4.6)
concurrent-ruby (~> 1.0)
dry-equalizer (0.2.1)
dry-inflector (0.1.2)
dry-logic (0.4.2)
dry-container (~> 0.2, >= 0.2.6)
dry-core (~> 0.2)
dry-equalizer (~> 0.2)
dry-types (0.13.2)
concurrent-ruby (~> 1.0)
dry-container (~> 0.3)
dry-core (~> 0.4, >= 0.4.4)
dry-equalizer (~> 0.2)
dry-inflector (~> 0.1, >= 0.1.2)
dry-logic (~> 0.4, >= 0.4.2)
dry-validation (0.12.0)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.1, >= 0.1.3)
dry-core (~> 0.2, >= 0.2.1)
dry-equalizer (~> 0.2)
dry-logic (~> 0.4, >= 0.4.0)
dry-types (~> 0.13.1)
erubis (2.7.0)
excon (0.62.0)
faraday (0.15.2)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
http-cookie (~> 1.0.0)
faraday_middleware (0.12.2)
faraday (>= 0.7.4, < 1.0)
ffi (1.9.25-x64-mingw32)
google-api-client (0.19.8)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.5, < 0.7.0)
httpclient (>= 2.8.1, < 3.0)
mime-types (~> 3.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
google-cloud (0.51.1)
google-cloud-bigquery (~> 1.1)
google-cloud-bigquery-data_transfer (~> 0.1)
google-cloud-container (~> 0.1)
google-cloud-dataproc (~> 0.1)
google-cloud-datastore (~> 1.4)
google-cloud-dlp (~> 0.1)
google-cloud-dns (~> 0.28)
google-cloud-error_reporting (~> 0.30)
google-cloud-firestore (~> 0.21)
google-cloud-language (~> 0.30)
google-cloud-logging (~> 1.5)
google-cloud-monitoring (~> 0.27)
google-cloud-os_login (~> 0.1)
google-cloud-pubsub (~> 0.30)
google-cloud-resource_manager (~> 0.29)
google-cloud-spanner (~> 1.3)
google-cloud-speech (~> 0.29)
google-cloud-storage (~> 1.10)
google-cloud-trace (~> 0.31)
google-cloud-translate (~> 1.2)
google-cloud-video_intelligence (~> 1.0)
google-cloud-vision (~> 0.28)
google-cloud-bigquery (1.5.0)
concurrent-ruby (~> 1.0)
google-api-client (~> 0.19.8)
google-cloud-core (~> 1.2)
googleauth (~> 0.6.2)
google-cloud-bigquery-data_transfer (0.1.0)
google-gax (~> 1.0)
google-cloud-container (0.1.0)
google-gax (~> 1.0.1)
google-cloud-core (1.2.0)
google-cloud-env (~> 1.0)
google-cloud-dataproc (0.1.0)
google-gax (~> 1.0.0)
google-cloud-datastore (1.4.0)
google-cloud-core (~> 1.2)
google-gax (~> 1.0)
google-protobuf (~> 3.3)
google-cloud-dlp (0.4.0)
google-gax (~> 1.0)
google-cloud-dns (0.28.0)
google-api-client (~> 0.19.0)
google-cloud-core (~> 1.2)
googleauth (~> 0.6.2)
zonefile (~> 1.04)
google-cloud-env (1.0.1)
faraday (~> 0.11)
google-cloud-error_reporting (0.30.0)
google-cloud-core (~> 1.2)
google-gax (~> 1.0)
stackdriver-core (~> 1.3)
google-cloud-firestore (0.21.1)
concurrent-ruby (~> 1.0)
google-cloud-core (~> 1.2)
google-gax (~> 1.0)
google-cloud-language (0.30.0)
google-gax (~> 1.0)
google-cloud-logging (1.5.0)
google-cloud-core (~> 1.2)
google-gax (~> 1.0)
stackdriver-core (~> 1.3)
google-cloud-monitoring (0.28.0)
google-gax (~> 1.0)
google-cloud-os_login (0.1.0)
google-gax (~> 1.0.0)
google-cloud-pubsub (0.30.2)
concurrent-ruby (~> 1.0)
google-cloud-core (~> 1.2)
google-gax (~> 1.0)
grpc-google-iam-v1 (~> 0.6.9)
google-cloud-resource_manager (0.29.0)
google-api-client (~> 0.19.8)
google-cloud-core (~> 1.2)
googleauth (~> 0.6.2)
google-cloud-spanner (1.4.0)
concurrent-ruby (~> 1.0)
google-cloud-core (~> 1.2)
google-gax (~> 1.0)
grpc-google-iam-v1 (~> 0.6.9)
google-cloud-speech (0.29.0)
google-cloud-core (~> 1.2)
google-gax (~> 1.0)
google-cloud-storage (1.12.0)
digest-crc (~> 0.4)
google-api-client (~> 0.19.0)
google-cloud-core (~> 1.2)
googleauth (~> 0.6.2)
google-cloud-trace (0.33.0)
google-cloud-core (~> 1.2)
google-gax (~> 1.0)
stackdriver-core (~> 1.3)
google-cloud-translate (1.2.0)
faraday (~> 0.13)
google-cloud-core (~> 1.2)
googleauth (~> 0.6.2)
google-cloud-video_intelligence (1.0.0)
google-gax (~> 1.0)
google-cloud-vision (0.28.0)
google-cloud-core (~> 1.2)
google-gax (~> 1.0)
google-gax (1.0.1)
google-protobuf (~> 3.2)
googleapis-common-protos (>= 1.3.5, < 2.0)
googleauth (~> 0.6.2)
grpc (>= 1.7.2, < 2.0)
rly (~> 0.2.3)
google-protobuf (3.5.1.2-x64-mingw32)
googleapis-common-protos (1.3.7)
google-protobuf (~> 3.0)
googleapis-common-protos-types (~> 1.0)
grpc (~> 1.0)
googleapis-common-protos-types (1.0.1)
google-protobuf (~> 3.0)
googleauth (0.6.2)
faraday (~> 0.12)
jwt (>= 1.4, < 3.0)
logging (~> 2.0)
memoist (~> 0.12)
multi_json (~> 1.11)
os (~> 0.9)
signet (~> 0.7)
grpc (1.12.0-x64-mingw32)
google-protobuf (~> 3.1)
googleapis-common-protos-types (~> 1.0.0)
googleauth (>= 0.5.1, < 0.7)
grpc-google-iam-v1 (0.6.9)
googleapis-common-protos (>= 1.3.1, < 2.0)
grpc (~> 1.0)
gssapi (1.2.0)
ffi (>= 1.0.1)
gyoku (1.3.1)
builder (>= 2.1.2)
hashie (3.5.7)
htmlentities (4.3.4)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
inifile (3.0.0)
inspec (2.2.10)
addressable (~> 2.4)
faraday (>= 0.9.0)
faraday_middleware (~> 0.12.2)
hashie (~> 3.4)
htmlentities
json (>= 1.8, < 3.0)
method_source (~> 0.8)
mixlib-log
parallel (~> 1.9)
parslet (~> 1.5)
pry (~> 0)
rspec (~> 3)
rspec-its (~> 1.2)
rubyzip (~> 1.1)
semverse
sslshake (~> 1.2)
thor (~> 0.20)
tomlrb (~> 1.2)
train (~> 1.4.11)
jmespath (1.4.0)
json (2.1.0)
jwt (2.1.0)
kitchen-inspec (0.23.1)
hashie (~> 3.4)
inspec (>= 0.34.0, < 3.0.0)
test-kitchen (~> 1.6)
kitchen-terraform (3.3.1)
dry-types (~> 0.9)
dry-validation (~> 0.10)
kitchen-inspec (~> 0.18)
mixlib-shellout (~> 2.2)
test-kitchen (~> 1.16)
little-plugger (1.1.4)
logging (2.2.2)
little-plugger (~> 1.1)
multi_json (~> 1.10)
memoist (0.16.0)
method_source (0.9.0)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mixlib-install (3.10.0)
mixlib-shellout
mixlib-versioning
thor
mixlib-log (2.0.4)
mixlib-shellout (2.3.2-universal-mingw32)
win32-process (~> 0.8.2)
wmi-lite (~> 1.0)
mixlib-versioning (1.2.2)
ms_rest (0.7.2)
concurrent-ruby (~> 1.0)
faraday (~> 0.9)
timeliness (~> 0.3)
ms_rest_azure (0.10.8)
concurrent-ruby (~> 1.0)
faraday (~> 0.9)
faraday-cookie_jar (~> 0.0.6)
ms_rest (~> 0.7.2)
multi_json (1.13.1)
multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (4.2.0)
net-ssh-gateway (1.3.0)
net-ssh (>= 2.6.5)
nori (2.6.0)
os (0.9.6)
parallel (1.12.1)
parslet (1.8.2)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (3.0.2)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rly (0.2.3)
rspec (3.7.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-core (3.7.1)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-its (1.2.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.1)
rubyntlm (0.6.2)
rubyzip (1.2.1)
semverse (2.0.0)
signet (0.8.1)
addressable (~> 2.3)
faraday (~> 0.9)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
sslshake (1.2.0)
stackdriver-core (1.3.0)
google-cloud-core (~> 1.2)
test-kitchen (1.21.2)
mixlib-install (~> 3.6)
mixlib-shellout (>= 1.2, < 3.0)
net-scp (~> 1.1)
net-ssh (>= 2.9, < 5.0)
net-ssh-gateway (~> 1.2)
thor (~> 0.19)
winrm (~> 2.0)
winrm-elevated (~> 1.0)
winrm-fs (~> 1.1)
thor (0.20.0)
timeliness (0.3.8)
tomlrb (1.2.6)
train (1.4.11)
aws-sdk (~> 2)
azure_mgmt_resources (~> 0.15)
docker-api (~> 1.26)
google-api-client (~> 0.19.8)
google-cloud (~> 0.51.1)
googleauth (~> 0.6.2)
inifile
json (>= 1.8, < 3.0)
mixlib-shellout (~> 2.0)
net-scp (~> 1.2)
net-ssh (>= 2.9, < 5.0)
winrm (~> 2.0)
winrm-fs (~> 1.0)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.5-x64-mingw32)
win32-process (0.8.3)
ffi (>= 1.0.0)
winrm (2.2.3)
builder (>= 2.1.2)
erubis (~> 2.7)
gssapi (~> 1.2)
gyoku (~> 1.0)
httpclient (~> 2.2, >= 2.2.0.2)
logging (>= 1.6.1, < 3.0)
nori (~> 2.0)
rubyntlm (~> 0.6.0, >= 0.6.1)
winrm-elevated (1.1.0)
winrm (~> 2.0)
winrm-fs (~> 1.0)
winrm-fs (1.2.0)
erubis (~> 2.7)
logging (>= 1.6.1, < 3.0)
rubyzip (~> 1.1)
winrm (~> 2.0)
wmi-lite (1.0.0)
zonefile (1.06)
PLATFORMS
x64-mingw32
DEPENDENCIES
kitchen-terraform
BUNDLED WITH
1.16.2
```
Bundle Doctor:
The Gemfile's dependencies are satisfied
No issues found with the installed bundle
Alright, awesome everything is clearly installed, so lets try this.
Bundle exec kitchen test:
Could not find aws-sdk-core-2.11.65 in any of the sources
Run `bundle install` to install missing gems.
How can this be, it was clearly installed when we ran bundle install and we can see that in the bundle env above.
Bundle info aws-sdk-core:
* aws-sdk-core (2.11.65)
Summary: AWS SDK for Ruby - Core
Homepage: http://github.com/aws/aws-sdk-ruby
Path: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/aws-sdk-core-2.11.65
Bundle show aws-sdk-core:
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/aws-sdk-core-2.11.65

This is happening because of a path mismatch. Bundler is looking at a path which is not your local path. Either specifically mention
gem install --path
or set
BUNDLE_DISABLE_SHARED_GEMS: 0
in .bundle/config file. This is set to true(1) by default. Use this with caution though as resetting this bundler setting will enable use of system-wide installed gems.

Try installing the gems in the system's directory, it might solve the problem as it seems your gems are installed in 2 separate directories C:/Users/rperkins/.gem/ruby/2.5.0 and C:/Ruby25-x64/lib/ruby/gems/2.5.0.
Install the gems with bundler using the following command:
bundle install --system

Using this might work getting the index directly from rubygems:
bundle install --full-index

Related

Selenium::WebDriver::Error::WebDriverError: no sessionId in returned payload - Moving from ruby 2.5.3. to 3.1.2

Upgraded ruby from 2.5.3 to 3.1.2 and associated gems. Cucumber tests were running fine against v 2.5.3 on chrome but now getting the below error and stack trace. Also attached my gemfile.lock
SELENIUM BROWSER: chrome
CHROME PATH: /opt/google/chrome
CHROME DRIVER: /home/####/git/se/acceptancetests/chromedriver
Selenium::WebDriver::Error::WebDriverError: no sessionId in returned payload
/home/####/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/selenium-webdriver-4.8.0/lib/selenium/webdriver/remote/bridge.rb:57:in create_session' /home/####/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/selenium-webdriver-4.8.0/lib/selenium/webdriver/common/driver.rb:313:in block in create_bridge'
internal:kernel:90:in tap' /home/####/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/selenium-webdriver-4.8.0/lib/selenium/webdriver/common/driver.rb:312:in create_bridge'
/home/####/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/selenium-webdriver-4.8.0/lib/selenium/webdriver/common/driver.rb:74:in initialize' /home/####/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/selenium-webdriver-4.8.0/lib/selenium/webdriver/chrome/driver.rb:36:in initialize'
/home/####/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/selenium-webdriver-4.8.0/lib/selenium/webdriver/common/driver.rb:47:in new' /home/####/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/selenium-webdriver-4.8.0/lib/selenium/webdriver/common/driver.rb:47:in for'
/home/####/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/selenium-webdriver-4.8.0/lib/selenium/webdriver.rb:88:in for' /home/####/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/capybara-3.38.0/lib/capybara/selenium/driver.rb:83:in browser'
/home/####/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/capybara-3.38.0/lib/capybara/selenium/driver.rb:137:in execute_script' /home/####/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/capybara-3.38.0/lib/capybara/session.rb:605:in execute_script'
/home/####/git/see/acceptancetests/features/step_definitions/store_steps.rb:2827:in wait_for_page_load' /home/####/git/se/acceptancetests/features/support/hooks.rb:18:in AfterStep'
Gemfile.lock:
GEM
remote: ###
specs:
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
axe-matchers (2.6.1)
dumb_delegator (~> 0.8)
virtus (~> 1.0)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
builder (3.2.4)
capybara (3.14.0)
addressable
matrix
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
concurrent-ruby (1.2.0)
cucumber (5.3.0)
builder (~> 3.2, >= 3.2.4)
cucumber-ci-environment (~> 9.0, >= 9.0.4)
cucumber-core (~> 11.0, >= 11.0.0)
cucumber-cucumber-expressions (~> 15.1, >= 15.1.1)
cucumber-gherkin (~> 23.0, >= 23.0.1)
cucumber-html-formatter (~> 19.1, >= 19.1.0)
cucumber-messages (~> 18.0, >= 18.0.0)
diff-lcs (~> 1.5, >= 1.5.0)
mime-types (~> 3.4, >= 3.4.1)
multi_test (~> 1.1, >= 1.1.0)
sys-uname (~> 1.2, >= 1.2.2)
cucumber-ci-environment (9.1.0)
cucumber-core (11.0.0)
cucumber-gherkin (~> 23.0, >= 23.0.1)
cucumber-messages (~> 18.0, >= 18.0.0)
cucumber-tag-expressions (~> 4.1, >= 4.1.0)
cucumber-cucumber-expressions (15.2.0)
cucumber-gherkin (23.0.1)
cucumber-messages (~> 18.0, >= 18.0.0)
cucumber-html-formatter (19.2.0)
cucumber-messages (~> 18.0, >= 18.0.0)
cucumber-messages (18.0.0)
cucumber-tag-expressions (4.1.0)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.5.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dumb_delegator (0.8.1)
equalizer (0.0.11)
excon (0.98.0)
ffi (1.15.5)
headless (2.3.1)
http-accept (1.7.0)
http-cookie (1.0.5)
domain_name (~> 0.5)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
jwt (2.2.3)
matrix (0.4.2)
mime-types (3.4.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2022.0105)
mini_mime (1.1.2)
mini_portile2 (2.6.1)
multi_test (1.1.0)
mysql2 (0.5.5)
netrc (0.11.0)
nokogiri (1.12.5)
mini_portile2 (~> 2.6.1)
racc (~> 1.4)
parallel (1.22.1)
parallel_tests (3.13.0)
parallel
public_suffix (5.0.1)
racc (1.6.2)
rack (3.0.4.1)
rack-test (2.0.2)
rack (>= 1.3)
regexp_parser (2.6.2)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.2.5)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.0)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
ruby-hmac (0.4.0)
ruby-oci8 (2.2.12)
rubyzip (2.3.2)
selenium-webdriver (4.8.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sys-uname (1.2.2)
ffi (~> 1.1)
thread_safe (0.3.6)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
virtus (1.0.5)
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)
websocket (1.2.9)
xpath (3.2.0)
nokogiri (~> 1.8)
PLATFORMS
ruby
DEPENDENCIES
axe-matchers
capybara
cucumber
excon
headless
i18n
jwt (~> 2.2.2)
mysql2
nokogiri (= 1.12.5)
The error here is indicative of you failing to generate capabilities correctly. So it's likely whatever updates you have done to selenium are now causing you to generate an invalid payload.
Around selenium 4alpha6 some large changes went in (So for v3 you could use desired_capabilities but now you simply use capabilities)
If you're using capybara you can use the gem here to just generate a simple driver in 1 click https://github.com/site-prism/automation_helpers/blob/main/lib/automation_helpers/drivers/local.rb#L7
EDIT: Your gems are a bit mismatched also. You're using an up to date selenium-webdriver but a really old version of capybara. See if you can keep those similar in age

How to install missing gem executables using bundler

I'm trying to automate app distribution to TestFlight using Fastlane and I'm following the recommendation in the docs to use a Gemfile and bundler.
I have minimal experience with ruby so I followed the instructions but I get an error saying the command could not be found and I need to install the missing gem executables with bundler.
I've been able to reproduce the error after uninstalling bundler and running the following script in an empty directory:
sudo gem install bundler
echo 'source "https://rubygems.org"\n\ngem "fastlane"' >> Gemfile
bundle update
bundle exec fastlane
stdout:
Successfully installed bundler-2.2.17
Parsing documentation for bundler-2.2.17
Done installing documentation for bundler after 2 seconds
1 gem installed
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies....................................
Using rake 13.0.3
Using CFPropertyList 3.0.3
Using public_suffix 4.0.6
Using artifactory 3.0.15
Using atomos 0.1.3
Using aws-eventstream 1.1.1
Using aws-partitions 1.458.0
Using jmespath 1.4.0
Using babosa 1.0.4
Using bundler 2.2.17
Using claide 1.0.3
Using colored 1.2
Using colored2 3.1.2
Using highline 2.0.3
Using declarative 0.0.20
Using digest-crc 0.6.3
Using unf_ext 0.0.7.7
Using dotenv 2.7.6
Using emoji_regex 3.2.2
Using excon 0.81.0
Using faraday-excon 1.1.0
Using faraday-net_http 1.0.1
Using faraday-net_http_persistent 1.1.0
Using multipart-post 2.0.0
Using ruby2_keywords 0.0.4
Using fastimage 2.2.3
Using gh_inspector 1.1.3
Using jwt 2.2.3
Using memoist 0.16.2
Using multi_json 1.15.0
Using os 1.1.1
Using httpclient 2.8.3
Using mini_mime 1.1.0
Using trailblazer-option 0.1.1
Using uber 0.1.0
Using retriable 3.1.2
Using rexml 3.2.5
Using webrick 1.7.0
Using google-cloud-errors 1.1.0
Using json 2.5.1
Using mini_magick 4.11.0
Using naturally 2.2.1
Using plist 3.6.0
Using rubyzip 2.3.0
Using security 0.1.3
Using terminal-notifier 2.0.0
Using unicode-display_width 1.7.0
Using tty-screen 0.8.1
Using tty-cursor 0.7.1
Using word_wrap 1.0.0
Using nanaimo 0.3.0
Using rouge 2.0.7
Using addressable 2.7.0
Using aws-sigv4 1.2.3
Using commander 4.6.0
Using unf 0.1.4
Using aws-sdk-core 3.114.0
Using domain_name 0.5.20190701
Using representable 3.1.1
Using simctl 1.6.8
Using terminal-table 1.8.0
Using tty-spinner 0.9.3
Using xcodeproj 1.19.0
Using xcpretty 0.3.0
Using aws-sdk-kms 1.43.0
Using http-cookie 1.0.3
Using xcpretty-travis-formatter 1.0.1
Using aws-sdk-s3 1.94.1
Using faraday 1.4.1
Using faraday-cookie_jar 0.0.7
Using faraday_middleware 1.0.0
Using signet 0.15.0
Using google-cloud-env 1.5.0
Using googleauth 0.16.2
Using google-cloud-core 1.6.0
Using google-apis-core 0.3.0
Using google-apis-androidpublisher_v3 0.3.0
Using google-apis-playcustomapp_v1 0.2.0
Using google-apis-iamcredentials_v1 0.3.0
Using google-apis-storage_v1 0.3.0
Using google-cloud-storage 1.31.0
Using fastlane 2.183.2
Bundle updated!
stderr:
Following files may not be writable, so sudo is needed:
/Library/Ruby/Gems/2.6.0
/Library/Ruby/Gems/2.6.0/build_info
/Library/Ruby/Gems/2.6.0/cache
/Library/Ruby/Gems/2.6.0/doc
/Library/Ruby/Gems/2.6.0/extensions
/Library/Ruby/Gems/2.6.0/gems
/Library/Ruby/Gems/2.6.0/plugins
/Library/Ruby/Gems/2.6.0/specifications
bundler: command not found: fastlane
Install missing gem executables with `bundle install`
Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.3)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.1.1)
aws-partitions (1.458.0)
aws-sdk-core (3.114.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.43.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.94.1)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.3)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.0.3)
colored (1.2)
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
declarative (0.0.20)
digest-crc (0.6.3)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
emoji_regex (3.2.2)
excon (0.81.0)
faraday (1.4.1)
faraday-excon (~> 1.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
multipart-post (>= 1.2, < 3)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday-excon (1.1.0)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.1.0)
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.2.3)
fastlane (2.183.2)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.1)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (~> 2.0.0)
naturally (~> 2.2)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.3.0)
google-apis-core (~> 0.1)
google-apis-core (0.3.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.14)
httpclient (>= 2.8.1, < 3.0)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
rexml
signet (~> 0.14)
webrick
google-apis-iamcredentials_v1 (0.3.0)
google-apis-core (~> 0.1)
google-apis-playcustomapp_v1 (0.2.0)
google-apis-core (~> 0.1)
google-apis-storage_v1 (0.3.0)
google-apis-core (~> 0.1)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.5.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.1.0)
google-cloud-storage (1.31.0)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.1)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.16.2)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.14)
highline (2.0.3)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.4.0)
json (2.5.1)
jwt (2.2.3)
memoist (0.16.2)
mini_magick (4.11.0)
mini_mime (1.1.0)
multi_json (1.15.0)
multipart-post (2.0.0)
nanaimo (0.3.0)
naturally (2.2.1)
os (1.1.1)
plist (3.6.0)
public_suffix (4.0.6)
rake (13.0.3)
representable (3.1.1)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.5)
rouge (2.0.7)
ruby2_keywords (0.0.4)
rubyzip (2.3.0)
security (0.1.3)
signet (0.15.0)
addressable (~> 2.3)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.8)
CFPropertyList
naturally
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
trailblazer-option (0.1.1)
tty-cursor (0.7.1)
tty-screen (0.8.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
webrick (1.7.0)
word_wrap (1.0.0)
xcodeproj (1.19.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
PLATFORMS
universal-darwin-20
DEPENDENCIES
fastlane
BUNDLED WITH
2.2.17
My suspicion is that is a RubyGems environment error but a day has gone by now and I have not been able to figure out what the issue is.

How to resolve a mixlib-shellout gem version conflict?

I am trying use to Kitchen/Chef to deploy. I am actually not sure if I've touched Kitchen yet.
My understanding is gem list lists all the gems in the repository, and a project fetches any gems it wants from this repository.
After I ran gem install bundler and gem install berkshelf I have a mixlib-shellout (2.2.6) shown by gem list | grep shellout.
Then I ran bundle install and based on my Gemfile, "mixlib-shellout (1.6.1)" is installed. Then I have "mixlib-shellout (2.2.6, 1.6.1)" shown by gem list | grep shellout.
From Gemfile.lock, I believe 1.6.1 is the version wanted. Then I ran berks install, an exception was thrown, which was:
Unable to activate chef-11.18.12, because mixlib-shellout-2.2.6 conflicts with mixlib-shellout (~> 1.4) - 11.18.12 - (Gem::LoadError)
I don't understand why it tries to fetch 2.2.6 instead of 1.6.1.
My Gemfile
source 'https://rubygems.org'
group :development do
gem 'berkshelf', '~> 4.0'
gem 'berkshelf-api-client', '~> 2.0'
gem 'thor'
gem 'chef', '~> 11.16'
gem 'test-kitchen', '~> 1.2'
gem 'kitchen-vagrant', '>= 0.16'
gem 'serverspec'
gem 'infrataster'
gem 'busser'
gem 'busser-serverspec'
gem 'chefspec', '~>4'
gem 'rubocop'
gem 'foodcritic'
end
gem 'chef-vault', '~> 2.2'
Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
addressable (2.3.8)
ast (2.2.0)
berkshelf (4.1.0)
addressable (~> 2.3.4)
berkshelf-api-client (~> 2.0)
buff-config (~> 1.0)
buff-extensions (~> 1.0)
buff-shell_out (~> 0.1)
celluloid (= 0.16.0)
celluloid-io (~> 0.16.1)
cleanroom (~> 1.0)
faraday (~> 0.9.0)
httpclient (~> 2.6.0)
minitar (~> 0.5.4)
octokit (~> 4.0)
retryable (~> 2.0)
ridley (~> 4.3)
solve (~> 2.0)
thor (~> 0.19)
berkshelf-api-client (2.0.0)
faraday (~> 0.9.1)
httpclient (~> 2.6.0)
buff-config (1.0.1)
buff-extensions (~> 1.0)
varia_model (~> 0.4)
buff-extensions (1.0.0)
buff-ignore (1.1.1)
buff-ruby_engine (0.1.0)
buff-shell_out (0.2.0)
buff-ruby_engine (~> 0.1.0)
busser (0.7.1)
thor (<= 0.19.0)
busser-serverspec (0.5.9)
busser
capybara (2.6.2)
addressable
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
celluloid (0.16.0)
timers (~> 4.0.0)
celluloid-io (0.16.2)
celluloid (>= 0.16.0)
nio4r (>= 1.1.0)
chef (11.18.12)
chef-zero (~> 2.2, >= 2.2.1)
diff-lcs (~> 1.2, >= 1.2.4)
erubis (~> 2.7)
ffi-yajl (~> 1.2)
highline (~> 1.6, >= 1.6.9)
mime-types (~> 1.16)
mixlib-authentication (~> 1.3)
mixlib-cli (~> 1.4)
mixlib-config (~> 2.0)
mixlib-log (~> 1.3)
mixlib-shellout (~> 1.4)
net-ssh (~> 2.6)
net-ssh-multi (~> 1.1)
ohai (~> 7.4)
plist (~> 3.1.0)
pry (~> 0.9)
rest-client (>= 1.0.4, <= 1.6.7)
chef-vault (2.7.1)
chef-zero (2.2.1)
ffi-yajl (~> 1.1)
hashie (~> 2.0)
mixlib-log (~> 1.3)
rack
chefspec (4.5.0)
chef (>= 11.14)
fauxhai (~> 3.0, >= 3.0.1)
rspec (~> 3.0)
cleanroom (1.0.0)
cliver (0.3.2)
coderay (1.1.0)
diff-lcs (1.2.5)
erubis (2.7.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.10.0)
faraday (>= 0.7.4, < 0.10)
fauxhai (3.1.0)
net-ssh
ffi (1.9.10)
ffi-yajl (1.4.0)
ffi (~> 1.5)
libyajl2 (~> 1.2)
foodcritic (6.0.0)
erubis
gherkin (~> 2.11)
nokogiri (>= 1.5, < 2.0)
rake
rufus-lru (~> 1.0)
treetop (~> 1.4)
yajl-ruby (~> 1.1)
gherkin (2.12.2)
multi_json (~> 1.3)
hashie (2.1.2)
highline (1.7.8)
hitimes (1.2.3)
httpclient (2.6.0.1)
infrataster (0.3.2)
capybara
faraday
faraday_middleware (>= 0.10.0)
net-ssh
net-ssh-gateway
poltergeist
rspec (>= 2.0, < 4.0)
thor
ipaddress (0.8.2)
json (1.8.3)
kitchen-vagrant (0.19.0)
test-kitchen (~> 1.4)
libyajl2 (1.2.0)
method_source (0.8.2)
mime-types (1.25.1)
mini_portile2 (2.0.0)
minitar (0.5.4)
mixlib-authentication (1.4.0)
mixlib-log
rspec-core (~> 3.2)
rspec-expectations (~> 3.2)
rspec-mocks (~> 3.2)
mixlib-cli (1.5.0)
mixlib-config (2.2.1)
mixlib-log (1.6.0)
mixlib-shellout (1.6.1)
molinillo (0.2.3)
multi_json (1.11.2)
multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.4)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
net-ssh-multi (1.2.1)
net-ssh (>= 2.6.5)
net-ssh-gateway (>= 1.2.0)
net-telnet (0.1.1)
nio4r (1.2.1)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
octokit (4.2.0)
sawyer (~> 0.6.0, >= 0.5.3)
ohai (7.4.1)
ffi (~> 1.9)
ffi-yajl (~> 1.1)
ipaddress
mime-types (~> 1.16)
mixlib-cli
mixlib-config (~> 2.0)
mixlib-log
mixlib-shellout (~> 1.2)
systemu (~> 2.6.4)
wmi-lite (~> 1.0)
parser (2.3.0.3)
ast (~> 2.2)
plist (3.1.0)
poltergeist (1.9.0)
capybara (~> 2.1)
cliver (~> 0.3.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
polyglot (0.3.5)
powerpack (0.1.1)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rainbow (2.1.0)
rake (10.5.0)
rest-client (1.6.7)
mime-types (>= 1.16)
retryable (2.0.3)
ridley (4.4.1)
addressable
buff-config (~> 1.0)
buff-extensions (~> 1.0)
buff-ignore (~> 1.1)
buff-shell_out (~> 0.1)
celluloid (~> 0.16.0)
celluloid-io (~> 0.16.1)
erubis
faraday (~> 0.9.0)
hashie (>= 2.0.2, < 4.0.0)
httpclient (~> 2.6)
json (>= 1.7.7)
mixlib-authentication (>= 1.3.0)
retryable (~> 2.0)
semverse (~> 1.1)
varia_model (~> 0.4.0)
rspec (3.4.0)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-core (3.4.2)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-its (1.2.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.4.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)
rubocop (0.37.0)
parser (>= 2.3.0.2, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 0.3)
ruby-progressbar (1.7.5)
rufus-lru (1.0.5)
safe_yaml (1.0.4)
sawyer (0.6.0)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
semverse (1.2.1)
serverspec (2.29.1)
multi_json
rspec (~> 3.0)
rspec-its
specinfra (~> 2.48)
sfl (2.2)
slop (3.6.0)
solve (2.0.2)
molinillo (~> 0.2.3)
semverse (~> 1.1)
specinfra (2.50.4)
net-scp
net-ssh (>= 2.7, < 3.1)
net-telnet
sfl
systemu (2.6.5)
test-kitchen (1.4.2)
mixlib-shellout (>= 1.2, < 3.0)
net-scp (~> 1.1)
net-ssh (~> 2.7, < 2.10)
safe_yaml (~> 1.0)
thor (~> 0.18)
thor (0.19.0)
timers (4.0.4)
hitimes
treetop (1.6.3)
polyglot (~> 0.3)
unicode-display_width (0.3.1)
varia_model (0.4.1)
buff-extensions (~> 1.0)
hashie (>= 2.0.2, < 4.0.0)
websocket-driver (0.6.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
wmi-lite (1.0.0)
xpath (2.0.0)
nokogiri (~> 1.3)
yajl-ruby (1.2.1)
PLATFORMS
ruby
DEPENDENCIES
berkshelf (~> 4.0)
berkshelf-api-client (~> 2.0)
busser
busser-serverspec
chef (~> 11.16)
chef-vault (~> 2.2)
chefspec (~> 4)
foodcritic
infrataster
kitchen-vagrant (>= 0.16)
rubocop
serverspec
test-kitchen (~> 1.2)
thor
BUNDLED WITH
1.11.2
You do not want to be bundling chef-11.18.12 with test-kitchen and berkshelf. You don't need to bundle chef with those tools, and you definitely will run into issues trying to bundle chef-11 with them.
The problem with creating a Gemfile with all of your cli tools in them is that those tools never activate the entire set of gems all at once. So test-kitchen does not depend on chef, and berkshelf only recently started pulling in chef-config as a library. When you try to create a bundle you are stating that every gem must be capable of being loaded into the same ruby process with every other gem. Even for the latest set of cli tools this is something which will frequently break. If you add in chef-11.18.12 then you are picking a gem with a frozen set of gem requirements from April of last year (about 9 months ago), and its highly likely that the latest test-kitchen and berkshelf versions will pull in versions of mixlib-shellout that are incompatible with that version of chef. It gets worse because we made breaking changes to mixlib-shellout and chef-11 is forever pinned on an old branch of mixlib-shellout that is not getting updates, while test-kitchen and berkshelf have moved on.
This is why ChefDK exists which is to give a consistent set of command line tools, in something that looks superficially like a bundle, but which is not a bundle. If test-kitchen or berkshelf don't load chef into memory simultaneously, then it is fine to include different versions of those gems which may 'conflict' in their use of mixlib-shellout but will load into different ruby process just fine. Since they never all try to load into the same ruby process the 'conflict' over mixlib-shellout never becomes a real one.
Also, we do try to take a bit of care that they all load together correctly and we don't wind up with multiple versions of mixlib-shellout in the ChefDK, but sometimes this is difficult to avoid.
What you are probably trying to do is bundle everything together because you want to have the latest toolchain, but want to use chef-11 because your production is chef-11. But the issue there is that when you are using berkshelf or test-kitchen there is no requirement to use chef-11 in that ruby process that you are launching. When TK starts, it should start up a virt, and will then install chef on that virt and launch it -- you should be making sure that virt has chef-11 so you can test your cookbooks, not that your TK process is bundled with chef-11. Whatever chef gem TK is bundled with is completely irrelevant to how it operates.
If you're trying to test chef-11 with test-kitchen the right way to do that is by setting the require_chef_omnibus config parameter to "11.18.12" in your kitchen.yml file. That will cause chef-11 to get installed on the virt you are trying to provision.
+1 on the recommendation to simply start by installing ChefDK and not trying to bundle your own toolset.
It is even recommended to use chef-12 knife and ChefDK on your workstation to manage chef-11 virts/hosts. There is one gotcha where chefspec really does run on your workstation and testing chefspec against chef-12 when your production is chef-11 could allow certain kinds of failures to go undetected. You could bundle chefspec against chef-11 and do testing that way -- however, its most likely better to stick with full integration testing with test-kitchen to find those problems, and just use chefspec as quick flame tests (or not use it at all -- unit testing and mocking out your resource collection are conceptually fairly advanced topics). Until you actually hit and issue with chefspec, its best not to worry about the chef version on your workstation and just use the latest chef version for knife.

Delayed job not working with ruby 2.2.1 and rails 3.2.22

I have update my project to use ruby 2.2.1 which should be supported on Rails 3.2.22 (see http://weblog.rubyonrails.org/2015/6/16/Rails-3-2-22-4-1-11-and-4-2-2-have-been-released-and-more/)
My delayed_jobs are broken:
class Feedback
TestJob = Struct.new(:id) do
def perform
puts "test job running #{id}"
end
def self.run_test_job
Delayed::Job.enqueue TestJob.new(1)
end
end
In the rails console (development) I do Feedback.run_test_job
While having a worker running rake jobs:work
I got this
[Worker(host:pro-vincent.home pid:62850)] Starting job worker
[Worker(host:pro-vincent.home pid:62850)] Job Feedback::TestJob (id=39) RUNNING
It should print test job running 1. I tested with ruby 2.1.1, it works fine.
What am I missing to make it work?
Gemfile.lock
GIT
remote: http://github.com/kalv/webrat.git
revision: 66130e4b9e903e07cfa86286655bde439c7b376e
specs:
webrat (0.7.2.pre)
nokogiri (>= 1.2.0)
rack (>= 1.0)
rack-test (>= 0.5.3)
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.2)
actionmailer (3.2.22)
actionpack (= 3.2.22)
mail (~> 2.5.4)
actionpack (3.2.22)
activemodel (= 3.2.22)
activesupport (= 3.2.22)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.22)
activesupport (= 3.2.22)
builder (~> 3.0.0)
activerecord (3.2.22)
activemodel (= 3.2.22)
activesupport (= 3.2.22)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.22)
activemodel (= 3.2.22)
activesupport (= 3.2.22)
activesupport (3.2.22)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
arel (3.0.3)
aws-sdk (2.2.5)
aws-sdk-resources (= 2.2.5)
aws-sdk-core (2.2.5)
jmespath (~> 1.0)
aws-sdk-resources (2.2.5)
aws-sdk-core (= 2.2.5)
bcrypt (3.1.10)
bootstrap-sass (2.3.2.2)
sass (~> 3.2)
builder (3.0.4)
capistrano (2.15.7)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
chronic (0.10.2)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
daemons (1.2.3)
delayed_job (4.1.1)
activesupport (>= 3.0, < 5.0)
delayed_job_active_record (4.1.0)
activerecord (>= 3.0, < 5)
delayed_job (>= 3.0, < 5)
devise (3.5.3)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
erubis (2.7.0)
excon (0.45.4)
execjs (2.6.0)
fission (0.5.0)
CFPropertyList (~> 2.2)
fog (1.36.0)
fog-aliyun (>= 0.1.0)
fog-atmos
fog-aws (>= 0.6.0)
fog-brightbox (~> 0.4)
fog-core (~> 1.32)
fog-dynect (~> 0.0.2)
fog-ecloud (~> 0.1)
fog-google (<= 0.1.0)
fog-json
fog-local
fog-powerdns (>= 0.1.1)
fog-profitbricks
fog-radosgw (>= 0.0.2)
fog-riakcs
fog-sakuracloud (>= 0.0.4)
fog-serverlove
fog-softlayer
fog-storm_on_demand
fog-terremark
fog-vmfusion
fog-voxel
fog-xenserver
fog-xml (~> 0.1.1)
ipaddress (~> 0.5)
nokogiri (~> 1.5, >= 1.5.11)
fog-aliyun (0.1.0)
fog-core (~> 1.27)
fog-json (~> 1.0)
ipaddress (~> 0.8)
xml-simple (~> 1.1)
fog-atmos (0.1.0)
fog-core
fog-xml
fog-aws (0.7.6)
fog-core (~> 1.27)
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-brightbox (0.10.1)
fog-core (~> 1.22)
fog-json
inflecto (~> 0.0.2)
fog-core (1.35.0)
builder
excon (~> 0.45)
formatador (~> 0.2)
fog-dynect (0.0.2)
fog-core
fog-json
fog-xml
fog-ecloud (0.3.0)
fog-core
fog-xml
fog-google (0.1.0)
fog-core
fog-json
fog-xml
fog-json (1.0.2)
fog-core (~> 1.0)
multi_json (~> 1.10)
fog-local (0.2.1)
fog-core (~> 1.27)
fog-powerdns (0.1.1)
fog-core (~> 1.27)
fog-json (~> 1.0)
fog-xml (~> 0.1)
fog-profitbricks (0.0.5)
fog-core
fog-xml
nokogiri
fog-radosgw (0.0.4)
fog-core (>= 1.21.0)
fog-json
fog-xml (>= 0.0.1)
fog-riakcs (0.1.0)
fog-core
fog-json
fog-xml
fog-sakuracloud (1.5.0)
fog-core
fog-json
fog-serverlove (0.1.2)
fog-core
fog-json
fog-softlayer (1.0.2)
fog-core
fog-json
fog-storm_on_demand (0.1.1)
fog-core
fog-json
fog-terremark (0.1.0)
fog-core
fog-xml
fog-vmfusion (0.1.0)
fission
fog-core
fog-voxel (0.1.0)
fog-core
fog-xml
fog-xenserver (0.2.2)
fog-core
fog-xml
fog-xml (0.1.2)
fog-core
nokogiri (~> 1.5, >= 1.5.11)
font-awesome-rails (3.2.1.3)
railties (>= 3.2, < 5.0)
formatador (0.2.5)
geocoder (1.2.12)
geoip (1.6.1)
google_visualr (2.5.1)
haml (4.0.7)
tilt
highline (1.7.8)
hike (1.2.3)
hipchat (1.5.2)
httparty
mimemagic
httparty (0.13.7)
json (~> 1.8)
multi_xml (>= 0.5.2)
i18n (0.7.0)
inflecto (0.0.2)
ipaddress (0.8.0)
jmespath (1.1.3)
journey (1.0.4)
jquery-rails (3.1.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (3.0.1)
jquery-rails
railties (>= 3.1.0)
json (1.8.3)
kaminari (0.16.3)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kaminari-bootstrap (3.0.1)
kaminari (>= 0.13.0)
rails
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
mimemagic (0.3.0)
mini_portile2 (2.0.0)
multi_json (1.11.2)
multi_xml (0.5.5)
mysql2 (0.3.15)
nested_form (0.3.2)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-sftp (2.1.2)
net-ssh (>= 2.6.5)
net-ssh (3.0.1)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
nokogiri (1.6.7)
mini_portile2 (~> 2.0.0.rc2)
orm_adapter (0.5.0)
polyglot (0.3.5)
pony (1.11)
mail (>= 2.0)
power_assert (0.2.6)
rack (1.4.7)
rack-cache (1.5.1)
rack (>= 0.4)
rack-pjax (0.8.0)
nokogiri (~> 1.5)
rack (~> 1.1)
rack-ssl (1.3.4)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (3.2.22)
actionmailer (= 3.2.22)
actionpack (= 3.2.22)
activerecord (= 3.2.22)
activeresource (= 3.2.22)
activesupport (= 3.2.22)
bundler (~> 1.0)
railties (= 3.2.22)
rails-settings-cached (0.2.4)
rails (>= 3.0.0)
rails_admin (0.4.9)
bootstrap-sass (~> 2.2)
builder (~> 3.0)
coffee-rails (>= 3.1, < 5)
font-awesome-rails (~> 3.0)
haml (~> 4.0)
jquery-rails (>= 2.1, < 4)
jquery-ui-rails (~> 3.0)
kaminari (~> 0.14)
nested_form (~> 0.3)
rack-pjax (~> 0.6)
rails (~> 3.1)
remotipart (~> 1.0)
safe_yaml (~> 0.6)
sass-rails (~> 3.1)
railties (3.2.22)
actionpack (= 3.2.22)
activesupport (= 3.2.22)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.4.2)
rdoc (3.12.2)
json (~> 1.4)
remotipart (1.2.1)
responders (1.1.2)
railties (>= 3.2, < 4.2)
rvm-capistrano (1.5.6)
capistrano (~> 2.15.4)
safe_yaml (0.9.3)
sass (3.4.20)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.2.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.11)
syck (1.0.5)
test-unit (3.1.5)
power_assert
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.46)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
warden (1.2.4)
rack (>= 1.0)
whenever (0.9.4)
chronic (>= 0.6.3)
xml-simple (1.1.5)
yaml_db (0.3.0)
rails (>= 3.0, < 4.3)
rake (>= 0.8.7)
PLATFORMS
ruby
DEPENDENCIES
aws-sdk
coffee-rails (~> 3.2.1)
daemons
delayed_job_active_record
devise
fog
geocoder
geoip
google_visualr
hipchat
jquery-rails
kaminari
kaminari-bootstrap
mysql2 (= 0.3.15)
pony
rails (~> 3)
rails-settings-cached (= 0.2.4)
rails_admin
rvm-capistrano
safe_yaml (= 0.9.3)
sass-rails (~> 3.2.3)
sqlite3
syck
test-unit
uglifier (>= 1.0.3)
webrat!
whenever
yaml_db
Edit: Gemfile.lock

Running Metrical with 1.9 Hash Syntax

I want to use Metrical with my brand-new Rails project using Ruby 1.9 hash syntax doing things like
before_filter :guest_user, only: [:new, :create]
before_filter :correct_user, only: :destroy
and I get this error:
/Users/xxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/racc/parser.rb:351:in `on_error': (Racc::ParseError)
parse error on value ":" (tCOLON)
I did a bit of investigation and found out that the ruby_parser gem does not support 1.9 hash syntax (see github issue) - not knowing which version that refers to I've tried to update the ruby_parser gem to 2.3.1 which doesn't work because some of the code quality tools included in metrical require 2.0 versions of ruby_parser.
Is there any way to solve this (besides rolling back to the old syntax)? I'm also a bit puzzled because a couple of the code quality tools seem rather outdated, checking on RubyToolBox confirmed this impression. Or am I missing something fundamental here?
(Here's my Gemfile.lock for reference):
GEM
remote: https://rubygems.org/
specs:
Saikuro (1.1.0)
actionmailer (3.2.6)
actionpack (= 3.2.6)
mail (~> 2.4.4)
actionpack (3.2.6)
activemodel (= 3.2.6)
activesupport (= 3.2.6)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.1)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.1.3)
activemodel (3.2.6)
activesupport (= 3.2.6)
builder (~> 3.0.0)
activerecord (3.2.6)
activemodel (= 3.2.6)
activesupport (= 3.2.6)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.6)
activemodel (= 3.2.6)
activesupport (= 3.2.6)
activesupport (3.2.6)
i18n (~> 0.6)
multi_json (~> 1.0)
addressable (2.2.8)
arel (3.0.2)
arrayfields (4.7.4)
awesome_print (1.0.2)
bcrypt-ruby (3.0.1)
bootstrap-sass (2.0.4.0)
bootstrap-will_paginate (0.0.7)
will_paginate
builder (3.0.0)
capybara (1.1.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
childprocess (0.3.4)
ffi (~> 1.0, >= 1.0.6)
chronic (0.3.0)
churn (0.0.13)
chronic (>= 0.2.3)
hirb
json_pure
main
ruby_parser (~> 2.0.4)
sexp_processor (~> 3.0.3)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.3.3)
colored (1.2)
cucumber (1.2.1)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.11.0)
json (>= 1.4.6)
cucumber-rails (1.3.0)
capybara (>= 1.1.2)
cucumber (>= 1.1.8)
nokogiri (>= 1.5.0)
database_cleaner (0.7.2)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
factory_girl (3.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (3.5.0)
factory_girl (~> 3.5.0)
railties (>= 3.0.0)
faker (1.0.1)
i18n (~> 0.4)
fattr (2.2.1)
ffi (1.1.0)
flay (1.4.3)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
flog (2.5.3)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
gherkin (2.11.1)
json (>= 1.4.6)
growl (1.0.3)
guard (1.2.3)
listen (>= 0.4.2)
thor (>= 0.14.6)
guard-rspec (1.2.0)
guard (>= 1.1)
guard-spork (1.1.0)
guard (>= 1.1)
spork (>= 0.8.4)
hike (1.2.1)
hirb (0.7.0)
i18n (0.6.0)
journey (1.0.4)
jquery-rails (2.0.2)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
json (1.7.3)
json_pure (1.7.3)
launchy (2.1.0)
addressable (~> 2.2.6)
libwebsocket (0.1.4)
addressable
listen (0.4.7)
rb-fchange (~> 0.0.5)
rb-fsevent (~> 0.9.1)
rb-inotify (~> 0.8.8)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
main (4.7.1)
map (6.2.0)
metric_fu (2.1.1)
Saikuro (>= 1.1.0)
activesupport (>= 2.0.0)
chronic (~> 0.3.0)
churn (>= 0.0.7)
flay (>= 1.2.1)
flog (>= 2.3.0)
rails_best_practices (>= 0.6.4)
rcov (>= 0.8.3.3)
reek (>= 1.2.6)
roodi (>= 2.1.0)
syntax
metrical (0.1.0)
metric_fu (~> 2.1.1)
rcov (~> 0.9)
mime-types (1.19)
multi_json (1.3.6)
nokogiri (1.5.5)
pg (0.14.0)
polyglot (0.3.3)
progressbar (0.11.0)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.2.6)
actionmailer (= 3.2.6)
actionpack (= 3.2.6)
activerecord (= 3.2.6)
activeresource (= 3.2.6)
activesupport (= 3.2.6)
bundler (~> 1.0)
railties (= 3.2.6)
rails_best_practices (1.10.1)
activesupport
awesome_print
colored
erubis
i18n
progressbar
sexp_processor
railties (3.2.6)
actionpack (= 3.2.6)
activesupport (= 3.2.6)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (0.9.2.2)
rb-fchange (0.0.5)
ffi
rb-fsevent (0.9.1)
rb-inotify (0.8.8)
ffi (>= 0.5.0)
rcov (0.9.11)
rdoc (3.12)
json (~> 1.4)
reek (1.2.12)
ripper_ruby_parser (~> 0.0.7)
ruby2ruby (~> 1.2.5)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
ripper_ruby_parser (0.0.8)
sexp_processor (~> 3.0)
roodi (2.1.0)
ruby_parser
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
rspec-mocks (~> 2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.11.1)
rspec-rails (2.11.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.11.0)
ruby2ruby (1.2.5)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
ruby_parser (2.0.6)
sexp_processor (~> 3.0)
rubyzip (0.9.9)
sass (3.1.20)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
selenium-webdriver (2.25.0)
childprocess (>= 0.2.5)
libwebsocket (~> 0.1.3)
multi_json (~> 1.0)
rubyzip
sexp_processor (3.0.10)
simplecov (0.6.4)
multi_json (~> 1.0)
simplecov-html (~> 0.5.3)
simplecov-html (0.5.3)
spork (0.9.2)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
syntax (1.0.0)
thor (0.15.4)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.33)
uglifier (1.2.6)
execjs (>= 0.3.0)
multi_json (~> 1.3)
will_paginate (3.0.3)
xpath (0.1.4)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
arrayfields
bcrypt-ruby
bootstrap-sass
bootstrap-will_paginate
capybara
coffee-rails
cucumber-rails
database_cleaner
factory_girl_rails
faker
fattr
growl
guard-rspec
guard-spork
jquery-rails
launchy
map
metrical
pg
rails (= 3.2.6)
rb-fsevent
rspec-rails
sass-rails
simplecov
spork
sqlite3
uglifier
will_paginate
After doing some more research on this issue and under the impression that ruby_parser wouldn't be updated for a while (watching https://github.com/seattlerb/ruby_parser though) I've decided to finally go for the nasty hack to replace my ruby hashes with the old syntax. I wrote a rake task for that such that it's easy to replace them all in one run, run metrical and then revert them back to their nice 1.9 hash syntax.
https://github.com/bkleinen/hash-reverter
Update: apparently, ruby_parser will be updated with version 3.0.0, but most of the tools depend on older versions.

Resources