前提・実現したいこと
以前にも同じ質問をさせていただきましたが、解決しないのでもう一度させていただきます。
以前の質問
Railsアプリ製作中
Ruby 3.4.5
Rails 4.2.8
postgresql(heroku本番環境)
mysql(開発環境)
herokuへのデプロイは何回か成功済み。
本番環境でログアウトできない問題が起きたので、こちらの通りに進めていたところでエラーが起きました。
Heroku + Rails4.2 + Devise + Bootstrap3系列で本番環境でログアウト(Sign_out)ができない問題
command
1rm -rf public/assets
でpublic/assetsを消し、
command
1git push heroku master
の操作後にエラーになりました。
発生している問題・エラーメッセージ
以下エラー文該当箇所抜粋
terminal
1rake aborted! 2remote: Sass::SyntaxError: Invalid CSS after "...heme.css.map */": expected selector or at-rule, was "{"version":3,"s..." 3remote: (in /tmp/build_d6cc61a71af5f196e061ff80c7dfc505/app/assets/stylesheets/application.scss) 4remote: (sass):8015
該当すると思われる、bootstrap-theme.css.mapを削除して入れ直してみましたが、変わりませんでした。
該当のソースコード
command
1rm -rf public/assets
でpublic/assetsを消し、
command
1git push heroku master
の操作後にエラーになりました。
以下該当可能性のあるファイル
assets/stylesheets/application.scss
ruby
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, vendor/assets/stylesheets, 6 * or vendor/assets/stylesheets of plugins, if any, 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 styles 10 * defined in the other CSS/SCSS files in this directory. It is generally better to create a new 11 * file per style scope. 12 * 13 *= require_self 14 *= require bootstrap-theme.css 15 *= require bootstrap-theme.css.map 16 *= require bootstrap-theme.min.css 17 *= require bootstrap.css 18 *= require bootstrap.css.map 19 *= require bootstrap.min.css 20 *= require main.css 21 *= require responsive.css 22 *= require profilecard.scss 23 *= require font-awesome 24 *= require linkmodal 25 *= require jquery.kenburnsy.css 26 27 *= require top.scss 28 *= require users.scss 29 *= require sign-up.css 30 */ 31 32@import "bootstrap-sprockets"; 33@import "bootstrap";
以下 Rakefileです。
ruby
1# Add your own tasks in files placed in lib/tasks ending in .rake, 2# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 4require File.expand_path('../config/application', __FILE__) 5 6Rails.application.load_tasks 7
試したこと
public/assetsを消しただけで、CSSはいじっていない(気づかずにタイプしている可能性はあるが)ので何が原因なのかわかりません。
compileの際に何かしらの問題が起こっているようですが、検索してもなかなか同じ問題が見つかりません。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。