2016-09-15 23 views
0

私はredmineをインストールしていますが、それを管理していますが、UIにはCSSスタイルがないようです。私は、アプリケーションのリンクをたどる場合は、次のメッセージ含む私の空のCSSを表示するの.css [SomeId]:Redmine 3.3.0(ruby on rails 4.2.6)application.cssにスタイルシートが生成されていない/含まれていません

/* 
* 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, vendor/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 styles 
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new 
* file per style scope. 
* 
*/ 

production.logを罰金だ

Processing by WelcomeController#index as HTML 
    Current user: anonymous 
    Rendered welcome/index.html.erb within layouts/base (1.0ms) 
Completed 200 OK in 18ms (Views: 9.4ms | ActiveRecord: 4.0ms) 
Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for ::1 at 2016-09-16 01:34:36 +0300 
Started GET "/assets/application-c2899b9307d416d19b1525a85be8085b93df756e91a5b0ee50ab1333f5ade73a.js" for ::1 at 2016-09-16 01:34:36 +0300 

の.htaccess

<IfModule mod_fastcgi.c> 
    AddHandler fastcgi-script .fcgi 
</IfModule> 
<IfModule mod_fcgid.c> 
    AddHandler fcgid-script .fcgi 
</IfModule> 
Options +FollowSymLinks +ExecCGI 

RewriteEngine On 

RewriteRule ^$ index.html [QSA] 
RewriteRule ^([^.]+)$ $1.html [QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
<IfModule mod_fastcgi.c> 
    RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] 
</IfModule> 
<IfModule mod_fcgid.c> 
    RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] 
</IfModule> 

ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly" 
  • 本のRedmineの3.3.0
  • ルビー2.2.4
  • レール4.2.6
  • 最新のXAMPP XAMPP -win32-7.0.9-1-VC14-インストーラ

どのようにこれを修正するための任意のアイデア?

答えて

0

私の大失敗は、私が開発モードで「Redmine」をまったく実行していなかったことです。私が今まで理解しているように、レールアセットパイプラインのルビーは連結されたapplication.cssを生成するために起動されませんでした。私がしなければならなかったのは、開発モードで一度サーバーを実行することでした。 Rails assets not precompiling, css looks different in productionRails 4: assets not loading in production

これは、RoRのと私の最初の出会いであると私は盲目的にコンパイルステップが含まれていなかった「Redmineの」のインストールのチュートリアルに従っ:

rake assets:precompile 
rails server -e development 

もこの答えではいくつかの有用な情報を見つけました。

問題が戻ってきましたが、実際には正しく修正されていませんでした。 mysql2アダプターとログイン資格情報の問題を解決して、データベースに正しく入力する必要がありました。その後、私はこのステップリストに最終的に到着するまで多くのことを試しました。

環境/生産に追加されました。RB

config.serve_static_files = true 
config.assets.compile = true 
config.assets.precompile = ['*.js', '*.css', '*.css.erb'] 
config.assets.digest = true 
  • 殺すサーバー
  • クリアアウトTMP /キャッシュ/資産
  • 削除、公開/資産
  • 実行すくい資産は:プリコンパイル
  • は、サーバレールの-eを起動します生産
  • ページをリロードする
私は application.cssためELINKをクリックしたとき、私はまだ空の.css

は最終的に私が代わりにそのことを考え出しました

set RAILS_ENV=production 
rake generate_secret_token 

set RAILS_ENV=production 
rake db:migrate 

set RAILS_ENV=production 
rake redmine:load_default_data 

set RAILS_ENV=production 
rake tmp:cache:clear 

set RAILS_ENV=production 
rake assets:precompile 

set RAILS_ENV=production 
rails server -e development 

私はページを訪問したWebインスペクタを開いた場合、:

CMDのRun gzipされたバージョンは1kbのサイズを持っていて興味深かったです。私はそれを削除し、VOILA、それは働いた。基本的に私は自分の問題を解決しましたが、なぜgzipが空のCSSで生成されるのかまだ分かりません。

関連する問題