個人アプリを開発するため。ネットからHTMLのテンプレートをファイルをダウンロードしました。
しかし、現状はエラーが起きてしまいます。
表示させたい画面
https://www.tooplate.com/live/2079-garage
自分がやったこと
boot strap、ont-awesome等のGemが正しくインストールされていないと思い、ググって記述しなければいけないディレクトリに
記述し、bundle installしましたが、現状はエラーになっています。
このエラーを調べると、やはり正しくインストールされていないことが原因と検索結果として出てきますが、その通り記述し直しても
変わらない状態です。
app/assets/stylesheets/application.scss
/* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's * vendor/assets/stylesheets directory can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the bottom of the * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS * files in this directory. Styles in this file should be added after the last require_* statement. * It is generally better to create a new file per style scope. * *= require font-awesome *= require_tree . *= require_self */ @import "bootstrap-sprockets"; @import "bootstrap"; @import "font-awesome-sprockets"; @import "font-awesome"; @import "semantic-ui";
config/webpack/enviroment.js
const { environment } = require('@rails/webpacker') const webpack = require('webpack') environment.plugins.prepend('Provide', new webpack.ProvidePlugin({ $: 'jquery/src/jquery', jQuery: 'jquery/src/jquery' }) ) module.exports = environment
app/views/movies/index.html.erb
<!doctype html> <html> <head> <meta charset="UTF-8"> <title>Garage Bootstrap Template</title> <meta name="description" content=""> <!-- Template 2079 Garage http://www.tooplate.com/view/2079-garage --> <meta name="author" content="Web Domus Italia"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="source/bootstrap-3.3.6-dist/css/bootstrap.css"> <link rel="stylesheet" type="text/css" href="source/font-awesome-4.5.0/css/font-awesome.css"> <link rel="stylesheet" type="text/css" href="style/slider.css"> <link rel="stylesheet" type="text/css" href="style/mystyle.css"> </head> <body> <!-- Header --> <div class="allcontain"> <div class="header"> <ul class="socialicon"> <li><a href="#"><i class="fa fa-facebook"></i></a></li> <li><a href="#"><i class="fa fa-twitter"></i></a></li> <li><a href="#"><i class="fa fa-google-plus"></i></a></li> <li><a href="#"><i class="fa fa-pinterest"></i></a></li> </ul> <ul class="givusacall"> <li>お問い合わせはこちら : 04-7191-2321 </li> </ul> <ul class="logreg"> <li><a href="#">ログイン</a> </li> <li><a href="#"><span class="register">新規登録</span></a></li> </ul> </div> <!-- Navbar Up --> <nav class="topnavbar navbar-default topnav"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed toggle-costume" data-toggle="collapse" data-target="#upmenu" aria-expanded="false"> <span class="sr-only"> Toggle navigaion</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand logo" href="#"><img src="image/logo1.png" alt="logo"></a> </div> </div> <div class="collapse navbar-collapse" id="upmenu"> <ul class="nav navbar-nav" id="navbarontop"> <li class="active"><a href="#">HOME</a> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">CATEGORIES <span class="caret"></span></a> <ul class="dropdown-menu dropdowncostume"> <li><a href="#">Sport</a></li> <li><a href="#">Old</a></li> 以下省略
Gemfile
source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '2.6.5' gem "sass-rails", "~>5" gem "bootstrap-sass", "~>3.3.6" gem "jquery-rails" gem "jquery-ui-rails" gem 'semantic-ui-sass' gem 'font-awesome-sass' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 6.0.0' # Use mysql as the database for Active Record gem 'mysql2', '>= 0.5.3' # Use Puma as the app server gem 'puma', '~> 3.11' # Use SCSS for stylesheets gem 'sass-rails', '~> 5' # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker gem 'webpacker', '~> 4.0' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '~> 5' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.7' # Use Redis adapter to run Action Cable in production # gem 'redis', '~> 4.0' # Use Active Model has_secure_password # gem 'bcrypt', '~> 3.1.7' # Use Active Storage variant # gem 'image_processing', '~> 1.2' # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.4.2', 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' gem 'listen', '>= 3.0.5', '< 3.2' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-watcher-listen', '~> 2.0.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 web drivers to run system tests with browsers gem 'webdrivers' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] gem 'pry-rails'
app/javascript/packs/application.js
// This file is automatically compiled by Webpack, along with any other files // present in this directory. You're encouraged to place your actual application logic in // a relevant structure within app/javascript and only use these pack files to reference // that code so it'll be compiled. require("@rails/ujs").start() require("turbolinks").start() require("@rails/activestorage").start() require("channels") require('jquery') require("../isotope") require("../myscript") require("../selectordie") $(function(){ $('.ui.dropdown').dropdown(); }) // Uncomment to copy all static images under ../images to the output folder and reference // them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>) // or the `imagePath` JavaScript helper below. // // const images = require.context('../images', true) // const imagePath = (name) => images(name, true) //= require jquery //= require bootstrap-sprockets //= require bootstrap
どなたかわかる方いましたら、ご教授お願いしたいです。
初心者のため、確認したいディレクトリを提示できていない可能性が大きいので、言っていただければすぐに開示いたします。
回答1件
あなたの回答
tips
プレビュー