[英]lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require': cannot load such file -- sass
After trying to update an old Rails app, including Ruby, i got an error when i tried to launch a server, launch a rails update app and much more commands.在尝试更新旧的 Rails 应用程序(包括 Ruby)后,我在尝试启动服务器、启动 Rails 更新应用程序和更多命令时遇到错误。
Configuration Initial (to update project):配置初始(更新项目):
to到
My error:我的错误:
/Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require': cannot load such file -- sass (LoadError)
--trace - 痕迹
➜ getin git:(update_to_3.1.2) ✗ rails s
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
/Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require': cannot load such file -- sass (LoadError)
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:332:in `block in require'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:299:in `load_dependency'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:332:in `require'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/font-awesome-sass-5.0.13/lib/font-awesome-sass.rb:48:in `configure_sass'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/font-awesome-sass-5.0.13/lib/font-awesome-sass.rb:13:in `load!'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/font-awesome-sass-5.0.13/lib/font-awesome-sass.rb:78:in `<main>'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:74:in `block (2 levels) in require'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in `each'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in `block in require'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `each'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `require'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler.rb:174:in `require'
from /Users/basile/code/BasileM/getin/config/application.rb:6:in `<main>'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:332:in `block in require'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:299:in `load_dependency'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:332:in `require'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-6.1.6.1/lib/rails/commands/server/server_command.rb:138:in `block in perform'
from <internal:kernel>:90:in `tap'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-6.1.6.1/lib/rails/commands/server/server_command.rb:135:in `perform'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-6.1.6.1/lib/rails/command/base.rb:69:in `perform'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-6.1.6.1/lib/rails/command.rb:48:in `invoke'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-6.1.6.1/lib/rails/commands.rb:18:in `<main>'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/basile/code/BasileM/getin/bin/rails:9:in `<top (required)>'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
from /Users/basile/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
from <internal:/Users/basile/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/Users/basile/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /Users/basile/code/BasileM/getin/bin/spring:15:in `<top (required)>'
from ./bin/rails:3:in `load'
from ./bin/rails:3:in `<main>'
I tried manies "solutions" unsuccessful:我尝试了许多“解决方案”但未成功:
My gemfile我的宝石文件
source 'https://rubygems.org'
ruby '3.1.2'
gem 'bootsnap'
gem 'jbuilder', '~> 2.0'
gem 'pg', '~> 0.21'
gem 'puma', '>= 4.3.12'
gem 'rails', '~> 6.0'
gem 'redis'
gem 'jquery-rails'
gem 'autoprefixer-rails'
gem 'font-awesome-sass', '~> 5.0.9'
gem 'sass-rails'
gem 'simple_form'
gem 'uglifier'
gem 'webpacker'
gem 'devise'
gem 'pundit'
gem 'rename'
gem 'searchkick'
gem 'acts_as_votable', '~> 0.12.0'
gem 'postmark-rails'
gem "actionview", ">= 5.2.2.1"
gem 'cookies_eu'
gem 'aws-sdk-s3', require: false
gem 'mini_magick', '~> 4.9', '>= 4.9.4'
gem 'activestorage-validator'
gem "chartkick"
gem 'friendly_id', '~> 5.2.4'
gem 'groupdate'
gem 'ahoy_matey'
gem 'devise_invitable', '~> 2.0.0'
gem 'clipboard-rails'
gem 'pagy', '~> 3.5'
gem "net-smtp", require: false
group :development do
gem 'web-console', '>= 3.3.0'
end
group :development, :test do
gem 'letter_opener', :group => :development
gem 'pry-byebug'
gem 'pry-rails'
gem 'listen', '~> 3.0.5'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'dotenv-rails'
end
Gemfile.lock:宝石文件锁:
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.6.1)
actionpack (= 6.1.6.1)
activesupport (= 6.1.6.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.6.1)
actionpack (= 6.1.6.1)
activejob (= 6.1.6.1)
activerecord (= 6.1.6.1)
activestorage (= 6.1.6.1)
activesupport (= 6.1.6.1)
mail (>= 2.7.1)
actionmailer (6.1.6.1)
actionpack (= 6.1.6.1)
actionview (= 6.1.6.1)
activejob (= 6.1.6.1)
activesupport (= 6.1.6.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.6.1)
actionview (= 6.1.6.1)
activesupport (= 6.1.6.1)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.6.1)
actionpack (= 6.1.6.1)
activerecord (= 6.1.6.1)
activestorage (= 6.1.6.1)
activesupport (= 6.1.6.1)
nokogiri (>= 1.8.5)
actionview (6.1.6.1)
activesupport (= 6.1.6.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.6.1)
activesupport (= 6.1.6.1)
globalid (>= 0.3.6)
activemodel (6.1.6.1)
activesupport (= 6.1.6.1)
activerecord (6.1.6.1)
activemodel (= 6.1.6.1)
activesupport (= 6.1.6.1)
activestorage (6.1.6.1)
actionpack (= 6.1.6.1)
activejob (= 6.1.6.1)
activerecord (= 6.1.6.1)
activesupport (= 6.1.6.1)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activestorage-validator (0.2.2)
rails (>= 6.0.4.1)
activesupport (6.1.6.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
acts_as_votable (0.12.1)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
ahoy_matey (4.1.0)
activesupport (>= 5.2)
device_detector
safely_block (>= 0.2.1)
autoprefixer-rails (10.4.7.0)
execjs (~> 2)
aws-eventstream (1.2.0)
aws-partitions (1.613.0)
aws-sdk-core (3.131.5)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.58.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.114.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.5.1)
aws-eventstream (~> 1, >= 1.0.2)
bcrypt (3.1.18)
bindex (0.8.1)
bootsnap (1.13.0)
msgpack (~> 1.2)
builder (3.2.4)
byebug (11.1.3)
chartkick (4.2.0)
clipboard-rails (1.7.1)
coderay (1.1.3)
concurrent-ruby (1.1.10)
cookies_eu (1.7.8)
js_cookie_rails (~> 2.2.0)
crass (1.0.6)
device_detector (1.0.7)
devise (4.8.1)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
devise_invitable (2.0.6)
actionmailer (>= 5.0)
devise (>= 4.6)
digest (3.1.0)
dotenv (2.8.1)
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
railties (>= 3.2)
errbase (0.2.2)
erubi (1.10.0)
execjs (2.8.1)
ffi (1.15.5)
font-awesome-sass (5.0.13)
sassc (>= 1.11)
friendly_id (5.2.5)
activerecord (>= 4.0.0)
globalid (1.0.0)
activesupport (>= 5.0)
groupdate (6.1.0)
activesupport (>= 5.2)
hashie (5.0.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
jmespath (1.6.1)
jquery-rails (4.5.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
js_cookie_rails (2.2.0)
railties (>= 3.1)
json (2.6.2)
launchy (2.5.0)
addressable (~> 2.7)
letter_opener (1.8.1)
launchy (>= 2.2, < 3)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.18.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.2)
method_source (1.0.0)
mini_magick (4.11.0)
mini_mime (1.1.2)
mini_portile2 (2.8.0)
minitest (5.16.2)
msgpack (1.5.4)
net-protocol (0.1.3)
timeout
net-smtp (0.3.1)
digest
net-protocol
timeout
nio4r (2.5.8)
nokogiri (1.13.8)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
orm_adapter (0.5.0)
pagy (3.11.0)
pg (0.21.0)
postmark (1.22.1)
json
postmark-rails (0.22.1)
actionmailer (>= 3.0.0)
postmark (>= 1.21.3, < 2.0)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.9.0)
byebug (~> 11.0)
pry (~> 0.13.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (4.0.7)
puma (5.6.4)
nio4r (~> 2.0)
pundit (2.2.0)
activesupport (>= 3.0.0)
racc (1.6.0)
rack (2.2.4)
rack-proxy (0.7.2)
rack
rack-test (2.0.2)
rack (>= 1.3)
rails (6.1.6.1)
actioncable (= 6.1.6.1)
actionmailbox (= 6.1.6.1)
actionmailer (= 6.1.6.1)
actionpack (= 6.1.6.1)
actiontext (= 6.1.6.1)
actionview (= 6.1.6.1)
activejob (= 6.1.6.1)
activemodel (= 6.1.6.1)
activerecord (= 6.1.6.1)
activestorage (= 6.1.6.1)
activesupport (= 6.1.6.1)
bundler (>= 1.15.0)
railties (= 6.1.6.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.3)
loofah (~> 2.3)
railties (6.1.6.1)
actionpack (= 6.1.6.1)
activesupport (= 6.1.6.1)
method_source
rake (>= 12.2)
thor (~> 1.0)
rake (13.0.6)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
redis (4.7.1)
rename (1.0.8)
activesupport
rails (>= 3.0.0)
thor (>= 0.19.1)
responders (3.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
safely_block (0.3.0)
errbase (>= 0.1.1)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
searchkick (5.0.4)
activemodel (>= 5.2)
hashie
semantic_range (3.0.0)
simple_form (5.1.0)
actionpack (>= 5.2)
activemodel (>= 5.2)
spring (2.1.1)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (4.1.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
thor (1.2.1)
tilt (2.0.11)
timeout (0.3.0)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.2.0)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webpacker (5.4.3)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.6.0)
PLATFORMS
ruby
DEPENDENCIES
actionview (>= 5.2.2.1)
activestorage-validator
acts_as_votable (~> 0.12.0)
ahoy_matey
autoprefixer-rails
aws-sdk-s3
bootsnap
chartkick
clipboard-rails
cookies_eu
devise
devise_invitable (~> 2.0.0)
dotenv-rails
font-awesome-sass (~> 5.0.9)
friendly_id (~> 5.2.4)
groupdate
jbuilder (~> 2.0)
jquery-rails
letter_opener
listen (~> 3.0.5)
mini_magick (~> 4.9, >= 4.9.4)
net-smtp
pagy (~> 3.5)
pg (~> 0.21)
postmark-rails
pry-byebug
pry-rails
puma (>= 4.3.12)
pundit
rails (~> 6.0)
redis
rename
sass-rails
searchkick
simple_form
spring
spring-watcher-listen (~> 2.0.0)
uglifier
web-console (>= 3.3.0)
webpacker
RUBY VERSION
ruby 3.1.2p20
BUNDLED WITH
2.1.4
application.rb:应用程序.rb:
require_relative 'boot'
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Getin
class Application < Rails::Application
config.generators do |generate|
generate.assets false
generate.helper false
generate.test_framework :test_unit, fixture: false
end
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 5.2
# Settings in config/environments/* take precedence over those specified here.
# Application configuration can go into files in config/initializers
# -- all .rb files in that directory are automatically loaded after loading
# the framework and any gems in your application.
end
end
boot.rb:启动.rb:
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
Any help would be much appreciated任何帮助将非常感激
In ruby 2.5.3, Rails 5.2.8.1, webpack@5.46.0在 ruby 2.5.3,Rails 5.2.8.1,webpack@5.46.0
I got the same issue with you.我和你有同样的问题。 And I resolve the problem by removing my project's
我通过删除项目的
tmp/cache
临时文件/缓存
if this can't resolve then adding this in Gemfile如果这不能解决然后在 Gemfile 中添加它
gem 'rexml', '~> 3.2', '>= 3.2.5'
try bundle install.尝试捆绑安装。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.