Я учусь импортировать Bootstrap в рельсах. Когда я пытаюсь запустить сервер, появляется следующее сообщение:
Sass::SyntaxError in Home#index
Showing C:/Users/Admin/.ssh/gazalpro/app/views/layouts/application.html.erb where line #7 raised:
File to import not found or unreadable: bootstrap.
Load paths:
C:/Users/Admin/.ssh/gazalpro/app/assets/config
C:/Users/Admin/.ssh/gazalpro/app/assets/images
C:/Users/Admin/.ssh/gazalpro/app/assets/javascripts
C:/Users/Admin/.ssh/gazalpro/app/assets/stylesheets
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/coffee-rails-4.2.2/lib/assets/javascripts
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actioncable-5.2.4.2/lib/assets/compiled
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activestorage-5.2.4.2/app/assets/javascripts
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionview-5.2.4.2/lib/assets/compiled
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/turbolinks-source-5.2.0/lib/assets/javascripts
C:/Users/Admin/.ssh/gazalpro/node_modules
Вот приложение. html .erb:
<!DOCTYPE html>
<html>
<head>
<title>Gazalpro</title>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
<body>
<%= yield %>
</body>
</html>
Вот Gemfile :
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.5'
gem 'rails', '~> 5.2.4', '>= 5.2.4.2'
gem 'sqlite3'
gem 'puma', '~> 3.11'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'duktape'
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'bootstrap', '~> 4.4', '>= 4.4.1'
gem 'jquery-rails'
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Вот приложение. js файл:
//= require rails-ujs
//= require activestorage
//= require turbolinks
//= require jquery3
//= require popper
//= require bootstrap
//= require_tree .
Вот приложение. css .s css файл:
@import "bootstrap";
Я уже выполнил команду «Bundle install» и перезапустил сервер. Но я все еще получаю эту ошибку.