我无法使用wicked_pdf生成pdf-Ruby on Rails

时间:2019-01-18 00:15:58

标签: ruby-on-rails rubygems nokogiri

我尝试使用wicked_pdf gem生成pdf报告,但无法生成

生成pdf的代码可以正常工作,因为在此错误之前,我已经生成了pdf

这是我的错误:

RuntimeError - PDF could not be generated!
 Command Error: NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It will be removed on or after 2018-12-01.
Gem::Specification#has_rdoc= called from /home/alejandro/registro-asistentes2/vendor/acts_as_xlsx/acts_as_xlsx.gemspec:12.
/var/lib/gems/2.4.0/gems/bundler-1.16.4/lib/bundler/spec_set.rb:91:in `block in materialize': Could not find nokogiri-1.8.5 in any of the sources (Bundler::GemNotFound)
    from /var/lib/gems/2.4.0/gems/bundler-1.16.4/lib/bundler/spec_set.rb:85:in `map!'
    from /var/lib/gems/2.4.0/gems/bundler-1.16.4/lib/bundler/spec_set.rb:85:in `materialize'
    from /var/lib/gems/2.4.0/gems/bundler-1.16.4/lib/bundler/definition.rb:171:in `specs'
    from /var/lib/gems/2.4.0/gems/bundler-1.16.4/lib/bundler/definition.rb:238:in `specs_for'
    from /var/lib/gems/2.4.0/gems/bundler-1.16.4/lib/bundler/definition.rb:227:in `requested_specs'
    from /var/lib/gems/2.4.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:108:in `block in definition_method'
    from /var/lib/gems/2.4.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:20:in `setup'
    from /var/lib/gems/2.4.0/gems/bundler-1.16.4/lib/bundler.rb:107:in `setup'
    from /var/lib/gems/2.4.0/gems/bundler-1.16.4/lib/bundler/setup.rb:20:in `<top (required)>'
    from /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require'
:
  app/controllers/client/control_accesses_controller.rb:153:in `create_report'

我已在gemfile gem 'nokogiri', '~> 1.8.5'上安装了gem nokogiri

我已经尝试使用bundle installgem install nokogiri -v 1.8.5来解决它,但是它不起作用

我的项目有更多需要生成pdf的地方,但总的来说我会收到此错误

0 个答案:

没有答案