From e5547b953ea7231b069668c46bfd9c776a04e31a Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 22 Jul 2014 13:35:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=95=99=E5=B8=88?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E6=88=B7=E6=89=93=E5=8C=85=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E6=89=80=E6=9C=89=E4=BD=9C=E4=B8=9A=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReadMe.txt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/ReadMe.txt b/ReadMe.txt index 8c57f348c..2505c295b 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -57,15 +57,9 @@ bundle exec rake db:migrate:up VERSION=20140410021724 2.运行 bundle install --without development test 3.运行 rake redmine:plugins:migrate RAILS_ENV=production 4.启动服务器 -5.把文本格式 (Administration > Settings > General > Text formatting)改为CKEditor -6.配置CKEditor插件(Administration > Plugins > Configure) - -某些情况数据库未插入插件配置值解决方案: -1 复制plugins -2 启动rails -3 运行migrate -3 打开admin配置插件(http://127.0.0.1:3000/settings/plugin/redmine_ckeditor) -4 点击“查询”(就是确定的功能) +5.配置CKEditor插件(Administration > Plugins > Configure) +6.把文本格式 (Administration > Settings > General > Text formatting)改为CKEditor +注意:一定要先配置CKEditor插件再见文本格式更改,不然,数据库不会生成对应记录,会报错。。 =============================================================================== 0719:若遇到首页定制报错问题请尝试如下操作 如果运行迁移文件有报错与‘sort_type’相关 先运行 bundle exec rake db:migrate:down version=20140716021202 bundle exec rake db:migrate:up version=20140716021202 From de17a84061dca4d765d1b0dfb6a6d64faf3e1819 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 22 Jul 2014 13:48:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E6=8D=95=E8=8E=B7=EF=BC=8C=E5=BD=93=E4=BD=9C=E4=B8=9A=E6=9C=AA?= =?UTF-8?q?=E6=89=BE=E5=88=B0=E7=9B=B8=E5=BA=94=E6=96=87=E4=BB=B6=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E8=B7=B3=E5=88=B0=E6=96=87=E4=BB=B6=E6=9C=AA=E6=89=BE?= =?UTF-8?q?=E5=88=B0=E9=A1=B5=E9=9D=A2(=E4=B8=8D=E6=8A=A5500=E9=94=99?= =?UTF-8?q?=E8=AF=AF)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/zipdown_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/zipdown_controller.rb b/app/controllers/zipdown_controller.rb index 653400cbe..16e6ea870 100644 --- a/app/controllers/zipdown_controller.rb +++ b/app/controllers/zipdown_controller.rb @@ -41,7 +41,7 @@ class ZipdownController < ApplicationController if homework != nil if homework.attachments.count > 0 zipfile = zip_homework_by_user homework - send_file zipfile, :filename => homework.name+".zip", :type => detect_content_type(zipfile) if zipfile + send_file zipfile, :filename => homework.name+".zip", :type => detect_content_type(zipfile) if(zipfile) else render_403 :message => :no_file_dowmload end @@ -51,6 +51,8 @@ class ZipdownController < ApplicationController else render_403 :message => :notice_not_authorized end + rescue => e + render file: 'public/file_not_found.html' end private