質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

jQuery

jQueryは、JavaScriptライブラリのひとつです。 簡単な記述で、JavaScriptコードを実行できるように設計されています。 2006年1月に、ジョン・レシグが発表しました。 jQueryは独特の記述法を用いており、機能のほとんどは「$関数」や「jQueryオブジェクト」のメソッドとして定義されています。

CSS

CSSはXMLやHTMLで表現した色・レイアウト・フォントなどの要素を指示する仕様の1つです。

Q&A

解決済

1回答

1412閲覧

fontawesomeのエラーが解決できない

KK78795046

総合スコア13

Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

jQuery

jQueryは、JavaScriptライブラリのひとつです。 簡単な記述で、JavaScriptコードを実行できるように設計されています。 2006年1月に、ジョン・レシグが発表しました。 jQueryは独特の記述法を用いており、機能のほとんどは「$関数」や「jQueryオブジェクト」のメソッドとして定義されています。

CSS

CSSはXMLやHTMLで表現した色・レイアウト・フォントなどの要素を指示する仕様の1つです。

0グッド

0クリップ

投稿2019/06/18 15:10

fontawesomeのエラーが解決できない

以下のエラーが発生するのですが、fontawesomeの追加により発生したエラーで、自身でエラーを解決する方法はあるでしょうか?
必要な情報があればおっしゃってください!

error

1ActionController::RoutingError (No route matches [GET] "/fonts/font-awesome/fa-brands-400.ttf"):

terminal

1actionpack (5.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call' 2web-console (3.7.0) lib/web_console/middleware.rb:135:in `call_app' 3web-console (3.7.0) lib/web_console/middleware.rb:30:in `block in call' 4web-console (3.7.0) lib/web_console/middleware.rb:20:in `catch' 5web-console (3.7.0) lib/web_console/middleware.rb:20:in `call' 6actionpack (5.2.3) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call' 7railties (5.2.3) lib/rails/rack/logger.rb:38:in `call_app' 8railties (5.2.3) lib/rails/rack/logger.rb:26:in `block in call' 9activesupport (5.2.3) lib/active_support/tagged_logging.rb:71:in `block in tagged' 10activesupport (5.2.3) lib/active_support/tagged_logging.rb:28:in `tagged' 11activesupport (5.2.3) lib/active_support/tagged_logging.rb:71:in `tagged' 12railties (5.2.3) lib/rails/rack/logger.rb:26:in `call' 13sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' 14actionpack (5.2.3) lib/action_dispatch/middleware/remote_ip.rb:81:in `call' 15actionpack (5.2.3) lib/action_dispatch/middleware/request_id.rb:27:in `call' 16rack (2.0.7) lib/rack/method_override.rb:22:in `call' 17rack (2.0.7) lib/rack/runtime.rb:22:in `call' 18activesupport (5.2.3) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call' 19actionpack (5.2.3) lib/action_dispatch/middleware/executor.rb:14:in `call' 20actionpack (5.2.3) lib/action_dispatch/middleware/static.rb:127:in `call' 21rack (2.0.7) lib/rack/sendfile.rb:111:in `call' 22railties (5.2.3) lib/rails/engine.rb:524:in `call' 23puma (3.12.1) lib/puma/configuration.rb:227:in `call' 24puma (3.12.1) lib/puma/server.rb:660:in `handle_request' 25puma (3.12.1) lib/puma/server.rb:474:in `process_client' 26puma (3.12.1) lib/puma/server.rb:334:in `block in run' 27puma (3.12.1) lib/puma/thread_pool.rb:135:in `block in spawn_thread' 28Started GET "/fonts/font-awesome/fa-brands-400.ttf" for ::1 at 2019-06-18 23:56:05 +0900 29 30ActionController::RoutingError (No route matches [GET] "/fonts/font-awesome/fa-brands-400.ttf"):

gemfile

1source 'https://rubygems.org' 2git_source(:github) { |repo| "https://github.com/#{repo}.git" } 3 4ruby '2.5.1' 5 6# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 7gem 'rails', '~> 5.2.3' 8# Use mysql as the database for Active Record 9gem 'mysql2', '>= 0.4.4', '< 0.6.0' 10# Use Puma as the app server 11gem 'puma', '~> 3.11' 12# Use SCSS for stylesheets 13gem 'sass-rails', '~> 5.0' 14# Use Uglifier as compressor for JavaScript assets 15gem 'uglifier', '>= 1.3.0' 16# See https://github.com/rails/execjs#readme for more supported runtimes 17# gem 'mini_racer', platforms: :ruby 18 19# Use CoffeeScript for .coffee assets and views 20gem 'coffee-rails', '~> 4.2' 21# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks 22# gem 'turbolinks', '~> 5' 23# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 24gem 'jbuilder', '~> 2.5' 25 26 27# Use ActiveStorage variant 28gem 'mini_magick', '~> 4.8' 29 30# Use Capistrano for deployment 31# gem 'capistrano-rails', group: :development 32 33# Reduces boot times through caching; required in config/boot.rb 34gem 'bootsnap', '>= 1.1.0', require: false 35 36group :development, :test do 37 # Call 'byebug' anywhere in the code to stop execution and get a debugger console 38 gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] 39 gem 'pry-rails' 40end 41 42group :development do 43 # Access an interactive console on exception pages or by calling 'console' anywhere in the code. 44 gem 'web-console', '>= 3.3.0' 45 gem 'listen', '>= 3.0.5', '< 3.2' 46 # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 47 gem 'spring' 48 gem 'spring-watcher-listen', '~> 2.0.0' 49 gem 'fog-aws' 50end 51 52group :test do 53 # Adds support for Capybara system testing and selenium driver 54 gem 'capybara', '>= 2.15' 55 gem 'selenium-webdriver' 56 # Easy installation and use of chromedriver to run system tests with Chrome 57 gem 'chromedriver-helper' 58end 59 60# Windows does not include zoneinfo files, so bundle the tzinfo-data gem 61gem 'tzinfo-data' 62# , platforms: [:mingw, :mswin, :x64_mingw, :jruby] 63# Use jquery as the JavaScript library 64gem 'jquery-rails' 65gem 'haml-rails' 66gem 'erb2haml' 67gem 'font-awesome-rails' 68gem 'devise' 69gem 'carrierwave' 70

haml

1!!! 2%html 3 %head 4 %meta{content: "text/html; charset=UTF-8", "http-equiv": "Content-Type"}/ 5 -# bootstrapのmeta読み込み 6 %meta{content: "width=device-width, initial-scale=1, shrink-to-fit=no", name: "viewport"}/ 7 8 %title 〇〇 9 -# bootstrapのcss読み込み 10 %link{crossorigin: "anonymous", href: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css", integrity: "sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T", rel: "stylesheet"}/ 11 12 %link{href: "https://use.fontawesome.com/releases/v5.6.1/css/all.css", rel: "stylesheet"}/ 13 %script{src: "https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"} 14 15 = csrf_meta_tags 16 = csp_meta_tag 17 = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' 18 = javascript_include_tag 'application', 'data-turbolinks-track': 'reload' 19 20 %body 21 .container-fulid 22 = yield 23 -# bootstrapのjs読み込み 24 %script{crossorigin: "anonymous", integrity: "sha384-3ceskX3iaEnIogmQchP8opvBy3Mi7Ce34nWjpBIwVTHfGYWQS9jwHDVRnpKKHJg7", src: "https://code.jquery.com/jquery-3.1.1.min.js"} 25 %script{crossorigin: "anonymous", integrity: "sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1", src: "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"} 26 %script{crossorigin: "anonymous", integrity: "sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM", src: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"} 27 %footer

scss

1/* 2 * This is a manifest file that'll be compiled into application.css, which will include all the files 3 * listed below. 4 * 5 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's 6 * vendor/assets/stylesheets directory can be referenced here using a relative path. 7 * 8 * You're free to add application-wide styles to this file and they'll appear at the bottom of the 9 * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS 10 * files in this directory. Styles in this file should be added after the last require_* statement. 11 * It is generally better to create a new file per style scope. 12 * 13 *= require_tree . 14 *= require_self 15 */ 16 17@import "./reset"; 18@import "font-awesome"; 19

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

https://use.fontawesome.com/以下のCSSを使うのであれば、SCSSの@import "font-awesome"は不要ですので、外してください。

投稿2019/06/18 22:15

maisumakun

総合スコア145183

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問