私はHerokuの初心者です。この Rails アプリケーションをローカルで実行すると正常に動作し、heroku にデプロイすると壊れます。画像をご覧ください。その画像内に矢印を向けました。
ここではローカルで正常に動作し、このように動作すると思われます。
CSS はここで画像を壊しますが、このようなことは想定されていません。Heroku サーバーでのみ発生します。
Railsアプリケーション内に複数のCSSファイルがあり、そのうち約9つです。
Ruby 1.9.3でRails 3.2を使用しています
私はこの問題を解決しようとしてきましたが、どこでもこの解決策を探しましたが、うまくいきませんでした。以前は問題なく動作していましたが、どのように発生するのかわかりません。
助けていただければ幸いです。解決された場合は、答えを正しいものとしてマークします。
ありがとう!
更新: 私が git push heroku を実行したとき、これが私が見たものです:
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_9a6529a8-57cd-4fb0-9cc0-39ebfcdb2c7a/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_9a6529a8-57cd-4fb0-9cc0-39ebfcdb2c7a/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_9a6529a8-57cd-4fb0-9cc0-39ebfcdb2c7a/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_9a6529a8-57cd-4fb0-9cc0-39ebfcdb2c7a/Rakefile:7)
Asset precompilation completed (105.95s)
application.css の中を見ると、
/*
*= require_self
*= require_tree .
*/
/* rest of file omitted */