2012-03-07 22 views
1

私はPDFKitを設定しようとしていますが、私のアプリケーションを起動することさえできません。私はこのエラーが続いています:PDFKITを読み込めません - 読み込みエラーを受け取ります

`require': cannot load such file -- pdfkit (LoadError) 

ここに私のapplication.rbファイルがあります。

require File.expand_path('../boot', __FILE__) 

require 'rails/all' 
require 'pdfkit' 

if defined?(Bundler) 
    # If you precompile assets before deploying to production, use this line 
    Bundler.require(*Rails.groups(:assets => %w(development test))) 
    # If you want your assets lazily compiled in production, use this line 
    #Bundler.require(:default, :assets, Rails.env) 
end 

module Form 
    class Application < Rails::Application 

    # Configure the default encoding used in templates for Ruby 1.9. 
    config.encoding = "utf-8" 

    # Configure sensitive parameters which will be filtered from the log file. 
    config.filter_parameters += [:password] 


    # Enable the asset pipeline 
    config.assets.enabled = true 

    # Version of your assets, change this if you want to expire all your assets 
    config.assets.version = '1.0' 
    config.middleware.use PDFKit::Middleware 

    end 
end 

私はpdfkitのwikiページの手順に従ってきましたが、私はこのエラーに悩まされています。私はそれがpdfkitの宝石を見つけることができないと思うが、それはインストールされているようだ。助けてください。

+0

OK – fl00r

+0

をpdfkit'実行 '逸品私はpdfkitへのパスを得た - 今何 – Ali

+0

削除'「そのを完了application.rb – fl00r

答えて

2

あなたGemfile

gem "pdfkit" 

に追加して、あなたのレールのルートディレクトリからbundleのコマンドを実行し

application.rb

から require 'pdfkit'を削除します。

関連する問題