> wkHTMLtopdf-binary gem v0.9.9.1
> wicked_pdf gem v0.10.2
> Rails 4.1.1
> Ruby 2.1.3
> OS X 10.10,64位
当我尝试从Rails生成pdf时,我收到错误消息:wkHTMLtopdf_darwin_386意外退出.这是完整的错误消息:
Process: wkHTMLtopdf_darwin_386 [1208]Path: /Users/USER/*/wkHTMLtopdf_darwin_386IDentifIEr: wkHTMLtopdf_darwin_386Version: ???Code Type: X86 (Native)Parent Process: ruby [1207]Responsible: Terminal [560]User ID: 502Date/Time: 2014-11-18 13:57:49.082 +0700OS Version: Mac OS X 10.10 (14A389)Report Version: 11Anonymous UUID: FE32CAE5-D54C-30C5-5D5E-6B3F12C58027Sleep/Wake UUID: 83991D0B-AAA7-4EE0-8FF7-5034B78B788FTime Awake Since Boot: 8000 secondsTime Since Wake: 1100 secondsCrashed Thread: UnkNownException Type: EXC_BAD_ACCESS (SIGBUS)Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000001Backtrace not availableUnkNown thread crashed with X86 Thread State (32-bit): eax: 0x015382c8 ebx: 0x00d8c971 ecx: 0x00000001 edx: 0x00000000 edi: 0x00000000 esi: 0x015382b4 ebp: 0xbfff6428 esp: 0xbfff6040 ss: 0x00000023 efl: 0x00010246 eip: 0x00d8e3c2 cs: 0x0000001b ds: 0x00000023 es: 0x00000023 fs: 0x00000000 gs: 0x0000000f cr2: 0x00000001Logical cpu: 3Error Code: 0x00000004Trap Number: 14Binary images description not availableExternal Modification Summary: Calls made by other processes targeting this process: task_for_pID: 1 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pID: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pID: 3109 thread_create: 0 thread_set_state: 0
我在标题中默默地说的原因是因为当我检查服务器日志时它运行得很好.这是一段摘录:
"***************\"/Users/davID/.rbenv/versions/2.1.3/bin/wkHTMLtopdf\" -q --footer-HTML \"file:////var/folders/4w/fybp8mln1pn91cqrxq6z2kcc0000gp/T/wicked_footer_pdf20141118-1102-1uce4hg.HTML\" --margin-bottom 13 \"file:////var/folders/4w/fybp8mln1pn91cqrxq6z2kcc0000gp/T/wicked_pdf20141118-1102-1jrv3s8.HTML\" \"/var/folders/4w/fybp8mln1pn91cqrxq6z2kcc0000gp/T/wicked_pdf_generated_file20141118-1102-qu51nc.pdf\" ***************" Rendered text template (1.1ms)Sent data test.pdf (8.4ms)Completed 200 OK in 6516ms (VIEws: 7.5ms | ActiveRecord: 6.8ms)
运行哪个wkHTMLtopdf给了我/Users/davID/.rbenv/shims/wkHTMLtopdf ..当我分别运行测试wkHTMLtopdf时(如在wkHTMLtopdf test1.HTML test1.pdf中)它运行完美.
是否有可能wkHTMLtopdf_darwin_386在基于64位的架构中不能正常工作? (即使我的Ubuntu也是基于64位的.)
任何帮助表示赞赏.
解决方法 你做过这个吗? :创建/编辑文件:
配置/初始化/ wicked_pdf.rb
If your wkHTMLtopdf executable is not on your webserver's path,you can configure it in an initializer:Wickedpdf.config = { :exe_path => '/Users/USER/*/wkHTMLtopdf_darwin_386'}
soure
总结以上是内存溢出为你收集整理的ruby-on-rails – 在OS X上,Wicked PDF无声地失败全部内容,希望文章能够帮你解决ruby-on-rails – 在OS X上,Wicked PDF无声地失败所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)