diff --git a/Gemfile b/Gemfile index 3abb76ef0..8d53dccc4 100644 --- a/Gemfile +++ b/Gemfile @@ -53,7 +53,7 @@ gem 'twitter' gem 'aws-sdk', '~> 2' gem 'responders' gem 'highline' -gem 'dtext_rb', :git => "https://github.com/r888888888/dtext_rb.git" +gem 'dtext_rb', :git => "https://github.com/r888888888/dtext_rb.git", :require => "dtext" # needed for looser jpeg header compat gem 'ruby-imagespec', :require => "image_spec", :git => "https://github.com/r888888888/ruby-imagespec.git", :branch => "exif-fixes" diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7ec4bcb94..c532ab02b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,3 +1,5 @@ +require 'dtext' + module ApplicationHelper def wordbreakify(string) lines = string.scan(/.{1,10}/) @@ -48,11 +50,11 @@ module ApplicationHelper end def format_text(text, options = {}) - DTextRagel.parse(text) + raw(DTextRagel.parse(text)) end def strip_dtext(text) - DTextRagel.parse_strip(text) + raw(DTextRagel.parse_strip(text)) end def error_messages_for(instance_name) diff --git a/config/unicorn/staging.rb b/config/unicorn/staging.rb index a1f7a7517..71a33400e 100644 --- a/config/unicorn/staging.rb +++ b/config/unicorn/staging.rb @@ -4,7 +4,7 @@ app_path = "/var/www/danbooru2/current" # Set unicorn options worker_processes 2 -preload_app false +preload_app true timeout 180 listen "127.0.0.1:9000"