ruby Rails已中止

ax6ht2ek  于 2023-10-17  发布在  Ruby
关注(0)|答案(1)|浏览(95)

由于某种原因,“Rails”开始响应此错误:

<internal:/Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- faraday/request/multipart (LoadError)
from <internal:/Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/google-api-client-0.7.1/lib/google/api_client/request.rb:16:in `<main>'
from <internal:/Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/google-api-client-0.7.1/lib/google/api_client.rb:27:in `<main>'
from <internal:/Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/google_drive-1.0.6/lib/google_drive.rb:5:in `<main>'
from <internal:/Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.8/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.8/lib/bundler/runtime.rb:55:in `each'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.8/lib/bundler/runtime.rb:55:in `block in require'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.8/lib/bundler/runtime.rb:44:in `each'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.8/lib/bundler/runtime.rb:44:in `require'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.8/lib/bundler.rb:195:in `require'
from /Users/eliseserres/code/Elise7L/firstplacetobe/config/application.rb:7:in `<main>'
from <internal:/Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7.2/lib/rails/commands/server/server_command.rb:137:in `block in perform'
from <internal:kernel>:90:in `tap'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7.2/lib/rails/commands/server/server_command.rb:134:in `perform'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7.2/lib/rails/command/base.rb:87:in `perform'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7.2/lib/rails/command.rb:48:in `invoke'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7.2/lib/rails/commands.rb:18:in `<main>'
from <internal:/Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /Users/eliseserres/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from ./bin/rails:4:in `<main>'

我尝试将我的ruby版本从3.1.2更新到3.2.2,但它没有纠正这个问题。
下面是我的Gem文件:

source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "3.2.2"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.0.7"

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem "sprockets-rails"

# Use postgresql as the database for Active Record
gem "pg", "~> 1.1"

# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "~> 5.0"

# Bundle and transpile JavaScript [https://github.com/rails/jsbundling-rails]
gem "jsbundling-rails"

# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem "turbo-rails"

# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
gem "stimulus-rails"

# Build JSON APIs with ease [https://github.com/rails/jbuilder]
gem "jbuilder"

#Pour la recherche dans l'app
gem "elasticsearch"
gem "searchkick"

# Use Redis adapter to run Action Cable in production
# gem "redis", "~> 4.0"

# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem "kredis"

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]

# Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", require: false

# Use Sass to process CSS
gem 'sass-rails', require: false
gem 'sassc-rails'

# Gem pour utiliser l'API google sheet v4 - 2023
gem 'google-apis-sheets_v4', '~> 0.3.0'
gem 'google_drive'
gem 'googleauth'

gem 'faraday-multipart'

# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
# gem "image_processing", "~> 1.2"

gem "devise"
gem "autoprefixer-rails"
gem "font-awesome-sass", "~> 6.1"
gem "simple_form", github: "heartcombo/simple_form"

# For image hosting
gem "cloudinary"

group :development, :test do
  # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
  gem "debug", platforms: %i[ mri mingw x64_mingw ]
  gem "dotenv-rails"

end

group :development do
  # Use console on exceptions pages [https://github.com/rails/web-console]
  gem "web-console"

  # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
  # gem "rack-mini-profiler"

  # Speed up commands on slow machines / big apps [https://github.com/rails/spring]
  # gem "spring"
end

group :test do
  # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
  gem "capybara"
  gem "selenium-webdriver"
  gem "webdrivers"
end

已经尝试了这些建议: https://github.com/fastlane/fastlane/issues/8112我不知道该怎么办,因为我无法查明问题的根源。
有没有人曾经遇到过这个问题?
谢谢你的帮助!

2ekbmq32

2ekbmq321#

看起来您的代码的某些部分仍然需要faraday-multipart gem,但它在Gemfile中被注解掉了。尝试取消注解,再次运行bundle,然后重新启动服务器。
此外,看起来你正在使用旧版本的google-api-client-问题来自那个gem,它试图要求faraday/request/multipart文件,但在新版本的faraday-multipart gem中不存在。
尝试更新google API gems -从google_drive开始。

相关问题