redmine 3.3.0(ruby on rails 4.2.6)样式表未在application.css中生成/包含

我已经安装了redmine,设法让它开始但是UI似乎缺少它的css样式。 如果我按照应用程序的链接[SomeId] .css它显示一个包含以下消息的空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

  AddHandler fastcgi-script .fcgi   AddHandler fcgid-script .fcgi  Options +FollowSymLinks +ExecCGI RewriteEngine On RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f  RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]   RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]  ErrorDocument 500 "

Application error

Rails application failed to start properly"
  • redmine 3.3.0
  • ruby2.2.4
  • 铁轨4.2.6
  • 最新的xampp xampp-win32-7.0.9-1-VC14-installer

有关如何解决此问题的任何想法?

显然我的错误是我在开发模式下根本没有运行’Redmine’。 据我所知,直到现在,还没有启动rails资产管道上的ruby以生成连接的application.css 。 我所要做的就是在开发模式下运行一次服务器。

 rake assets:precompile rails server -e development 

在这个答案中也发现了一些有用的信息: Rails资产没有预编译,css在生产中看起来不同而Rails 4:资产未在生产中加载

这是我第一次遇到RoR,我盲目地遵循了“Redmine”的安装教程,但没有包含编译步骤。

编辑返回的问题,实际上甚至没有正确修复。 不得不解决mysql2适配器和登录凭据的一些问题,以便正确填充数据库。 之后我尝试了很多东西,直到最后到达这个步骤列表:

environment / production.rb中添加

 config.serve_static_files = true config.assets.compile = true config.assets.precompile = ['*.js', '*.css', '*.css.erb'] config.assets.digest = true 
  • 杀死服务器
  • 清除tmp / cache / assets
  • 删除公共/资产
  • 运行rake资产:预编译
  • 启动服务器rails s -e production
  • 重新加载页面

在cmd中运行:

 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检查器,当我点击了application.css的elink时,我仍然得到空的.css

最终我发现gziped版本的大小为1kb,这很有趣。 我删除它和VOILA,它工作。 基本上我解决了我的问题,但我仍然不知道为什么用空css生成gzip。