Recent Blog Entries

Rails says, "Missing pdf-writer" when pdf-writer is unpacked in vendor/gems

Issue:
*"Missing these required gems: pdf-writer = 1.1.8"*

config/environment.rb:
Issue:
*"Missing these required gems: pdf-writer = 1.1.8"*

config/environment.rb:
1
  config.gem "pdf-writer", :lib => "pdf/writer", :version => '1.1.8'

That looks write... what's the issue? Turns out my new server didn't have the required dependencies.

I added this above the config/gem line:

1
  require "#{RAILS_ROOT}/vendor/gems/pdf-writer-1.1.8/lib/pdf/writer.rb"

and saw:

1
2
  no such file to load -- color
  no such file to load -- transaction-simple      # after fixing color

the fixes:
1
2
  gem install color
  gem install transaction-simple

remove the require line, and voila!