現在、rails4にてWEBアプリケーションを作成しております。
herokuで本番環境を構築しております。
その本番環境において、一部の画像が表示されず、また、一部のCSSのみ効かないという症状が出ており、色々と試したのですが、今現在においても解決できていない状態です。
ちなみに、開発環境においては、全て正常に動いておりますが、本番環境においては、画像及びCSSはない前提のもと動いているような気がします。
なお、画像及びCSSはassets下に保存しております。
解決策や情報源をご存じの方がおられたらご教授いただけますでしょうか。
どうぞよろしくお願いいたします。
・追記
どうやら、コンパイルができてなかったみたいです。
エラーのログを記載します。
rake aborted!
Sprockets::ArgumentError: require_tree argument must be a directory
(in /Users/〇〇/Desktop/projects/app/assets/javascripts/main/application.js:16)
/Users/〇〇/.rbenv/versions/2.3.1/bin/bundle:23:in load' /Users/〇〇/.rbenv/versions/2.3.1/bin/bundle:23:in
<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
application.jsの内容も下記に記載します。
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree ./main
引き続きよろしくお願いします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/08/29 09:32
2017/08/29 11:39
2017/08/29 11:53
2017/08/29 11:58
2017/08/29 12:07
2017/08/29 12:13
2017/08/29 12:17
2017/08/29 12:28
2017/08/29 13:21
2017/08/29 13:23
2017/08/30 00:11
2017/08/30 11:22
2017/08/31 02:52