karnov / htmltoword

Ruby html to word gem
MIT License
179 stars 71 forks source link

rails5.1.2 uninitialized constant Mime::DOCX #59

Closed YaEvan closed 7 years ago

YaEvan commented 7 years ago

when I use rails5.1.2, NameError (uninitialized constant Mime::DOCX): respond_to :docx def word respond_to do |format| format.docx do render docx: 'word', filename: 'word.docx' end end end

Gemfile gem 'responders' gem 'htmltoword'

gem 'rails', '~> 5.1.2'

routes get "word" => "homes#word", format: 'docx'

YaEvan commented 7 years ago

use gem 'htmltoword', git: "https://github.com/karnov/htmltoword" in Gemfile,fix the problem.