emrekutlu / paperclip-compression

image compression processor for Paperclip
MIT License
72 stars 37 forks source link

TypeError: no implicit conversion of nil into String #11

Closed cserb closed 6 years ago

cserb commented 9 years ago

I have this error on the production server (FreeBSD) while locally everything works. So I thought that the compression might not work due to optipng but running it manually on a png file optipng -o 5 file.png on the server works perfectly fine

TypeError: no implicit conversion of nil into String
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-compression-0.3.6/lib/paperclip-compression/base.rb", line 34, in join
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-compression-0.3.6/lib/paperclip-compression/base.rb", line 34, in command_path
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-compression-0.3.6/lib/paperclip-compression/jpeg.rb", line 21, in make
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-compression-0.3.6/lib/paperclip-compression/base.rb", line 13, in make
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-compression-0.3.6/lib/paperclip-compression/paperclip/compression.rb", line 17, in make_jpeg
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-compression-0.3.6/lib/paperclip-compression/paperclip/compression.rb", line 7, in make
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/processor.rb", line 33, in make
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/attachment.rb", line 522, in block in post_process_style
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/attachment.rb", line 521, in each
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/attachment.rb", line 521, in inject
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/attachment.rb", line 521, in post_process_style
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/attachment.rb", line 512, in block in post_process_styles
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/attachment.rb", line 511, in each
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/attachment.rb", line 511, in post_process_styles
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/attachment.rb", line 503, in block (2 levels) in post_process
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 425, in _run__2992332529639714429__logo_post_process__2532431087528189716__callbacks
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 405, in __run_callback
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 385, in _run_logo_post_process_callbacks
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 81, in run_callbacks
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/callbacks.rb", line 36, in run_paperclip_callbacks
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/attachment.rb", line 501, in block in post_process
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 403, in _run__2992332529639714429__post_process__2532431087528189716__callbacks
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 405, in __run_callback
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 385, in _run_post_process_callbacks
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 81, in run_callbacks
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/callbacks.rb", line 36, in run_paperclip_callbacks
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/attachment.rb", line 500, in post_process
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/attachment.rb", line 456, in post_process_file
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/attachment.rb", line 108, in assign
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-4.2.1/lib/paperclip/has_attached_file.rb", line 66, in block in define_setter
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activerecord-3.2.21/lib/active_record/attribute_assignment.rb", line 85, in block in assign_attributes
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activerecord-3.2.21/lib/active_record/attribute_assignment.rb", line 78, in each
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activerecord-3.2.21/lib/active_record/attribute_assignment.rb", line 78, in assign_attributes
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activerecord-3.2.21/lib/active_record/persistence.rb", line 216, in block in update_attributes
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activerecord-3.2.21/lib/active_record/transactions.rb", line 313, in block in with_transaction_returning_status
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/database_statements.rb", line 192, in transaction
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activerecord-3.2.21/lib/active_record/transactions.rb", line 208, in transaction
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activerecord-3.2.21/lib/active_record/transactions.rb", line 311, in with_transaction_returning_status
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activerecord-3.2.21/lib/active_record/persistence.rb", line 215, in update_attributes
  File "/usr/home/mars/projects/sdj/releases/20150129092044/app/controllers/account/company_controller.rb", line 24, in update_logo
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_controller/metal/implicit_render.rb", line 4, in send_action
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/abstract_controller/base.rb", line 167, in process_action
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_controller/metal/rendering.rb", line 10, in process_action
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/abstract_controller/callbacks.rb", line 18, in block in process_action
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 448, in block in _run__3563959746979386811__process_action__2602670410999237866__callbacks
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 215, in block in _conditional_callback_around_842
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/vanity-1.8.3/lib/vanity/frameworks/rails.rb", line 104, in vanity_context_filter
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 214, in _conditional_callback_around_842
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 414, in _run__3563959746979386811__process_action__2602670410999237866__callbacks
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 405, in __run_callback
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 385, in _run_process_action_callbacks
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 81, in run_callbacks
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/abstract_controller/callbacks.rb", line 17, in process_action
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_controller/metal/rescue.rb", line 29, in process_action
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb", line 30, in block in process_action
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/notifications.rb", line 123, in block in instrument
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/notifications/instrumenter.rb", line 20, in instrument
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/notifications.rb", line 123, in instrument
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb", line 29, in process_action
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_controller/metal/params_wrapper.rb", line 207, in process_action
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activerecord-3.2.21/lib/active_record/railties/controller_runtime.rb", line 18, in process_action
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/abstract_controller/base.rb", line 121, in process
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/abstract_controller/rendering.rb", line 45, in process
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_controller/metal.rb", line 203, in dispatch
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_controller/metal/rack_delegation.rb", line 14, in dispatch
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_controller/metal.rb", line 246, in block in action
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_dispatch/routing/route_set.rb", line 73, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_dispatch/routing/route_set.rb", line 73, in dispatch
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_dispatch/routing/route_set.rb", line 36, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/journey-1.0.4/lib/journey/router.rb", line 68, in block in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/journey-1.0.4/lib/journey/router.rb", line 56, in each
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/journey-1.0.4/lib/journey/router.rb", line 56, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_dispatch/routing/route_set.rb", line 608, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/warden-1.2.3/lib/warden/manager.rb", line 35, in block in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/warden-1.2.3/lib/warden/manager.rb", line 34, in catch
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/warden-1.2.3/lib/warden/manager.rb", line 34, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_dispatch/middleware/best_standards_support.rb", line 17, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rack-1.4.5/lib/rack/etag.rb", line 23, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rack-1.4.5/lib/rack/conditionalget.rb", line 35, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_dispatch/middleware/head.rb", line 14, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_dispatch/middleware/params_parser.rb", line 21, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_dispatch/middleware/flash.rb", line 242, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rack-1.4.5/lib/rack/session/abstract/id.rb", line 210, in context
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rack-1.4.5/lib/rack/session/abstract/id.rb", line 205, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_dispatch/middleware/cookies.rb", line 341, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activerecord-3.2.21/lib/active_record/query_cache.rb", line 64, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb", line 479, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_dispatch/middleware/callbacks.rb", line 28, in block in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 405, in _run__3889086744914438778__call__2532431087528189716__callbacks
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 405, in __run_callback
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 385, in _run_call_callbacks
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/callbacks.rb", line 81, in run_callbacks
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_dispatch/middleware/callbacks.rb", line 27, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_dispatch/middleware/remote_ip.rb", line 31, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rollbar-1.3.1/lib/rollbar/middleware/rails/rollbar.rb", line 24, in block in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rollbar-1.3.1/lib/rollbar.rb", line 747, in scoped
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rollbar-1.3.1/lib/rollbar/middleware/rails/rollbar.rb", line 22, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_dispatch/middleware/debug_exceptions.rb", line 16, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rollbar-1.3.1/lib/rollbar/middleware/rails/show_exceptions.rb", line 22, in call_with_rollbar
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_dispatch/middleware/show_exceptions.rb", line 56, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/railties-3.2.21/lib/rails/rack/logger.rb", line 32, in call_app
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/railties-3.2.21/lib/rails/rack/logger.rb", line 16, in block in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/tagged_logging.rb", line 22, in tagged
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/railties-3.2.21/lib/rails/rack/logger.rb", line 16, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/actionpack-3.2.21/lib/action_dispatch/middleware/request_id.rb", line 22, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rack-1.4.5/lib/rack/methodoverride.rb", line 21, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rack-1.4.5/lib/rack/runtime.rb", line 17, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/activesupport-3.2.21/lib/active_support/cache/strategy/local_cache.rb", line 72, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rack-1.4.5/lib/rack/lock.rb", line 15, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rack-rewrite-1.4.1/lib/rack/rewrite.rb", line 24, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rack-cache-1.2/lib/rack/cache/context.rb", line 136, in forward
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rack-cache-1.2/lib/rack/cache/context.rb", line 143, in pass
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rack-cache-1.2/lib/rack/cache/context.rb", line 155, in invalidate
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rack-cache-1.2/lib/rack/cache/context.rb", line 71, in call!
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/rack-cache-1.2/lib/rack/cache/context.rb", line 51, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/railties-3.2.21/lib/rails/engine.rb", line 484, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/railties-3.2.21/lib/rails/application.rb", line 231, in call
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/railties-3.2.21/lib/rails/railtie/configurable.rb", line 30, in method_missing
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/unicorn-4.8.3/lib/unicorn/http_server.rb", line 576, in process_client
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/unicorn-4.8.3/lib/unicorn/http_server.rb", line 670, in worker_loop
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/unicorn-4.8.3/lib/unicorn/http_server.rb", line 525, in spawn_missing_workers
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/unicorn-4.8.3/lib/unicorn/http_server.rb", line 140, in start
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/unicorn-4.8.3/bin/unicorn", line 126, in <top (required)>
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/bin/unicorn", line 23, in load
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/bin/unicorn", line 23, in <main>
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/bin/ruby_executable_hooks", line 15, in eval
  File "/home/mars/.rvm/gems/ruby-2.1.2@sdj/bin/ruby_executable_hooks", line 15, in <main>
emrekutlu commented 9 years ago

paperclip-compression uses it's own optipng which is included in the bin folder. What is your FreeBSD and ruby version?

cserb commented 9 years ago

@emrekutlu ruby is 2.1.2 and FreeBSD is 10.1

emrekutlu commented 9 years ago

@cserb I released a new version; 0.3.7. Can you try that please?

cserb commented 9 years ago

@emrekutlu I tried with the new version. I get this now:

Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/d02ebba086eb60b6155b94e12649ff8420150318-75717-18uk6vd.jpg[0]' 2>/dev/null
Command :: identify -format %m '/tmp/d02ebba086eb60b6155b94e12649ff8420150318-75717-18uk6vd.jpg[0]'
Command :: convert '/tmp/d02ebba086eb60b6155b94e12649ff8420150318-75717-18uk6vd.jpg[0]' -auto-orient -resize "40x40>" '/tmp/d02ebba086eb60b6155b94e12649ff8420150318-75717-18uk6vd20150318-75717-upjwda'
Command :: /home/mars/.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-compression-0.3.7/bin/linux/x64/jpegtran -copy none -optimize -perfect '/tmp/d02ebba086eb60b6155b94e12649ff8420150318-75717-18uk6vd20150318-75717-upjwda' > '/tmp/d02ebba086eb60b6155b94e12649ff8420150318-75717-18uk6vd20150318-75717-upjwda20150318-75717-1c26e2g'
[paperclip] An error was received while processing: #<Paperclip::Error: JPEGTRAN : There was an error processing the thumbnail for d02ebba086eb60b6155b94e12649ff8420150318-75717-18uk6vd20150318-75717-upjwda>

This is obviously a problem of the binary not working on FreeBSD. I went to ../.rvm/gems/ruby-2.1.2@sdj/gems/paperclip-compression-0.3.7/bin/linux/x64/jpegtran and created a symlink to the system jpegtran. It works without a problem.

As a quick solution, wouldn't it be better to use the jpegtran and optipng available on the machine IF FreeBSD is detected, or to be able to provide the path in the config?

sonali1908 commented 9 years ago

Did you get any solution for this? I am facing the same problem with png images.

cserb commented 9 years ago

@sonali1908 as I mentioned in the post before, I went to the folder of the paperclip-compression gem and created a symlink to the binaries installed via freebsd ports this is obviously very dirty, but I didn't update any relevant dependencies yet so it still works for me. A cleaner solution would be to fork the gem and apply a different rule for freebsd.

emrekutlu commented 6 years ago

command option added with the release of 1.0.0. You can get rid of that symlinks and use that option. Refer to readme for more information. No backward incompatible changes.