Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web_translate_it gem not updated via Gemfile and bundler with v2.7.4 #220

Closed
markltownsend opened this issue Nov 16, 2022 · 2 comments · Fixed by #221
Closed

web_translate_it gem not updated via Gemfile and bundler with v2.7.4 #220

markltownsend opened this issue Nov 16, 2022 · 2 comments · Fixed by #221

Comments

@markltownsend
Copy link

Having dependency issues again when using this tool with our Gemfile.

Gemfile

# Gemfile
source 'https://rubygems.org'

gem 'cocoapods'
gem 'fastlane'
gem 'dotenv'
gem 'web_translate_it'

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)

Error message

bundler: failed to load command: wti (/Users/mark/Flipboard/iOS/Flipboard-iOS/vendor/bundle/ruby/3.1.0/bin/wti)
/Users/mark/Flipboard/iOS/Flipboard-iOS/vendor/bundle/ruby/3.1.0/gems/web_translate_it-2.7.4/lib/web_translate_it.rb:2:in `require': cannot load such file -- multipart/post (LoadError)
	from /Users/mark/Flipboard/iOS/Flipboard-iOS/vendor/bundle/ruby/3.1.0/gems/web_translate_it-2.7.4/lib/web_translate_it.rb:2:in `<top (required)>'
	from /Users/mark/Flipboard/iOS/Flipboard-iOS/vendor/bundle/ruby/3.1.0/gems/web_translate_it-2.7.4/bin/wti:6:in `require'
	from /Users/mark/Flipboard/iOS/Flipboard-iOS/vendor/bundle/ruby/3.1.0/gems/web_translate_it-2.7.4/bin/wti:6:in `<top (required)>'
	from /Users/mark/Flipboard/iOS/Flipboard-iOS/vendor/bundle/ruby/3.1.0/bin/wti:25:in `load'
	from /Users/mark/Flipboard/iOS/Flipboard-iOS/vendor/bundle/ruby/3.1.0/bin/wti:25:in `<top (required)>'
	from /Users/mark/.gem/ruby/3.1.0/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:58:in `load'
	from /Users/mark/.gem/ruby/3.1.0/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:58:in `kernel_load'
	from /Users/mark/.gem/ruby/3.1.0/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:23:in `run'
	from /Users/mark/.gem/ruby/3.1.0/gems/bundler-2.3.11/lib/bundler/cli.rb:483:in `exec'
	from /Users/mark/.gem/ruby/3.1.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/mark/.gem/ruby/3.1.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/mark/.gem/ruby/3.1.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /Users/mark/.gem/ruby/3.1.0/gems/bundler-2.3.11/lib/bundler/cli.rb:31:in `dispatch'
	from /Users/mark/.gem/ruby/3.1.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /Users/mark/.gem/ruby/3.1.0/gems/bundler-2.3.11/lib/bundler/cli.rb:25:in `start'
	from /Users/mark/.gem/ruby/3.1.0/gems/bundler-2.3.11/exe/bundle:48:in `block in <top (required)>'
	from /Users/mark/.gem/ruby/3.1.0/gems/bundler-2.3.11/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	from /Users/mark/.gem/ruby/3.1.0/gems/bundler-2.3.11/exe/bundle:36:in `<top (required)>'
	from /Users/mark/.rbenv/versions/3.1.2/bin/bundle:25:in `load'
	from /Users/mark/.rbenv/versions/3.1.2/bin/bundle:25:in `<main>'

This appears to be the same issue as before with the multipart-post gem and conflicts with other gems that require a different version.

I've had to rollback all the way to 2.7.1 again to avoid this error.

@edouard
Copy link
Collaborator

edouard commented Nov 17, 2022

Hey @markltownsend

I managed to reproduce the issue by creating this Gemfile:

# Gemfile
source 'https://rubygems.org'

gem 'fastlane'
gem 'web_translate_it'

And then run bundle and bundle exec wti --version

/Users/edouard/code/github/webtranslateit/lib/web_translate_it.rb:2:in `require': cannot load such file -- multipart/post (LoadError)
	from /Users/edouard/code/github/webtranslateit/lib/web_translate_it.rb:2:in `<top (required)>'
	from /Users/edouard/code/github/webtranslateit/bin/wti:6:in `require'
	from /Users/edouard/code/github/webtranslateit/bin/wti:6:in `<top (required)>'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/bin/wti:25:in `load'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/bin/wti:25:in `<top (required)>'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/gems/bundler-2.3.12/lib/bundler/cli/exec.rb:58:in `load'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/gems/bundler-2.3.12/lib/bundler/cli/exec.rb:58:in `kernel_load'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/gems/bundler-2.3.12/lib/bundler/cli/exec.rb:23:in `run'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/gems/bundler-2.3.12/lib/bundler/cli.rb:483:in `exec'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/gems/bundler-2.3.12/lib/bundler/cli.rb:31:in `dispatch'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/gems/bundler-2.3.12/lib/bundler/cli.rb:25:in `start'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/gems/bundler-2.3.12/exe/bundle:48:in `block in <top (required)>'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/gems/bundler-2.3.12/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/gems/bundler-2.3.12/exe/bundle:36:in `<top (required)>'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/bin/bundle:25:in `load'
	from /Users/edouard/.rvm/gems/ruby-3.1.2@webtranslateit.com/bin/bundle:25:in `<main>'

The issue was due to that require, which is multipart_post >= 2.2-specific, see socketry/multipart-post#65:

require 'multipart/post'

It works if I remove that require. While it's not ideal to not require a dependency, it seems to work. I will try to see with fastlane if they can bump their multipart_post dependency. The version 2.2.0 they lock us into is very old (from 2013).

In the meanwhile, I will release wti v.2.7.5 in a minute, can you let me know whether it works or doesn't work for you?

Thanks!

@edouard
Copy link
Collaborator

edouard commented Nov 17, 2022

I’ve submitted a PR on fastlane/fastlane#20870 to relax their dependency to multipart_post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants