Open smathews opened 3 months ago
This also happens on my Mac with Ruby 3.2.3. I worked around the mkdir_p issue by manually changing the gems/travis-1.13.0/lib/travis/tools/completion.rb file around line 38 to be:
def update_completion
FileUtils.mkdir_p(config_path)
FileUtils.cp(Assets['travis.sh'], cmp_file)
end
instead of just:
def update_completion
mkdir_p(config_path)
cp(Assets['travis.sh'], cmp_file)
end
The follow-up errors after the FileUtils.mkdir_p stuff above are from "gh" (github library) isn't installed by default, giving error like:
$ travis
<internal:/opt/homebrew/Cellar/ruby@3.2/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:136:in `require': cannot load such file -- gh (LoadError)
from <internal:/opt/homebrew/Cellar/ruby@3.2/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
from /opt/homebrew/lib/ruby/gems/3.2.0/gems/travis-1.13.0/lib/travis/tools/github.rb:7:in `<top (required)>'
from <internal:/opt/homebrew/Cellar/ruby@3.2/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
from <internal:/opt/homebrew/Cellar/ruby@3.2/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
...
Now if one does "gem install gh", the version will be incompatible with faraday library like:
$ travis
/opt/homebrew/Cellar/ruby@3.2/3.2.3/lib/ruby/3.2.0/rubygems/specification.rb:2317:in `raise_if_conflicts': Unable to activate gh-0.18.0, because faraday-2.7.12 conflicts with faraday (~> 1.0) (Gem::ConflictError)
from /opt/homebrew/Cellar/ruby@3.2/3.2.3/lib/ruby/3.2.0/rubygems/specification.rb:1450:in `activate'
from /opt/homebrew/Cellar/ruby@3.2/3.2.3/lib/ruby/3.2.0/rubygems.rb:205:in `rescue in try_activate'
from /opt/homebrew/Cellar/ruby@3.2/3.2.3/lib/ruby/3.2.0/rubygems.rb:198:in `try_activate'
from <internal:/opt/homebrew/Cellar/ruby@3.2/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:139:in `block in require'
from <internal:/opt/homebrew/Cellar/ruby@3.2/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:139:in `synchronize'
from <internal:/opt/homebrew/Cellar/ruby@3.2/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:139:in `rescue in require'
from <internal:/opt/homebrew/Cellar/ruby@3.2/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:135:in `require'
So on linux (Jenkins job on Ubuntu that needed travis-cli), I I have successfully worked around this by manually building a gh branch gem like:
git clone https://github.com/travis-ci/gh
cd gh
git checkout -b prd-ruby-upgrade-dev remotes/origin/prd-ruby-upgrade-dev
echo "3.2.3" > .ruby-version
gem build gh.gemspec
find . -name gh-0.21.0.gem
gem install ./gh-0.21.0.gem
i'm seeing this as well. i have never used ruby before, but installed it (on Fedora 39) to use the travis CLI. Any updates?
> ruby -v
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
> gem install travis --no-document
Building native extensions. This could take a while...
Successfully installed ffi-1.16.3
Successfully installed ethon-0.16.0
Successfully installed typhoeus-1.4.1
Successfully installed faraday-net_http-3.0.2
Successfully installed faraday-2.7.12
Successfully installed faraday-typhoeus-1.1.0
Successfully installed faraday-retry-2.2.1
Successfully installed public_suffix-5.0.5
Successfully installed addressable-2.8.6
Successfully installed concurrent-ruby-1.2.3
Successfully installed tzinfo-2.0.6
Successfully installed minitest-5.22.3
Successfully installed i18n-1.14.4
Successfully installed activesupport-7.0.8.1
Successfully installed travis-gh-0.21.0
Successfully installed websocket-1.2.10
Successfully installed pusher-client-0.6.2
Successfully installed launchy-2.5.2
Successfully installed json_pure-2.6.3
Successfully installed highline-2.1.0
Successfully installed faraday-rack-2.0.0
Successfully installed travis-1.13.3
22 gems installed
> travis -v
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- rack/test (LoadError)
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /usr/local/share/gems/gems/faraday-rack-2.0.0/lib/faraday/adapter/rack.rb:3:in `<top (required)>'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /usr/local/share/gems/gems/faraday-rack-2.0.0/lib/faraday/rack.rb:4:in `<top (required)>'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /home/christy/.local/share/gem/ruby/gems/travis-1.13.3/lib/travis/client/session.rb:9:in `<top (required)>'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /home/christy/.local/share/gem/ruby/gems/travis-1.13.3/lib/travis/client.rb:9:in `<top (required)>'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /home/christy/.local/share/gem/ruby/gems/travis-1.13.3/lib/travis/cli.rb:4:in `<top (required)>'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /home/christy/.local/share/gem/ruby/gems/travis-1.13.3/bin/travis:9:in `<top (required)>'
from /home/christy/bin/travis:25:in `load'
from /home/christy/bin/travis:25:in `<main>'
Edit: I ended up being able to install and use a much older version. In case anyone else here is a complete newbie like me and not familiar with the community whatsoever, but needs the travis
cli, this runs locally: gem install travis -v 1.11.1
1.14.0 works for the brew build, https://github.com/Homebrew/homebrew-core/pull/173434
Using ruby 3.2.2 on Fedora 38. Upgrading from 1.11.1. I've uninstalled all gems and I'm still getting a failure when running
travis
. This happens with 1.12.0 and 1.13.0.I noticed that
rack/test
is in the dev dependencies, so I tried this as well.I then installed rspec manually.
Still failure (although now different)