2016-09-07 7 views
1

を見つけることができませんでした、と私はそのような問題に直面:私のmix.exsでフェニックスモジュールExAws.S3.Clientがロードされていないと私は図書館<a href="https://github.com/CargoSense/ex_aws" rel="nofollow">https://github.com/CargoSense/ex_aws</a>を使用

== Compilation error on file web/models/s3.ex == 
** (CompileError) web/models/s3.ex:2: module ExAws.S3.Client is not loaded and could not be found 
    (elixir) expanding macro: Kernel.use/2 
    web/models/s3.ex:2: Minion.S3 (module) 
    (elixir) lib/kernel/parallel_compiler.ex:116: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1 

def application do 
    [mod: {Minion, []}, 
    applications: [:phoenix, ... :ex_aws, :httpoison, :poison]] 
    end 
... 
    defp deps do 
    [{:phoenix, "~> 1.2.1"}, 
... 
    {:ex_aws, "~> 1.0.0-beta0"}, 
    {:poison, "~> 2.0"}, 
    {:httpoison, "~> 0.8"}] 
    end 

を私config.exs:

config :minion, :ex_aws, 
    access_key_id: "...", 
    secret_access_key: "...", 
    region: "us-east-1", 
    s3: [ 
    scheme: "http://", 
    host: "...", 
    region: "us-east-1" 
    ] 

私s3.ex:

defmodule Minion.S3 do 
    use ExAws.S3.Client, otp_app: :minion 
end 

バージョン> = 1.0.0でこの問題に

+0

「ExAws.S3.Client」モジュールはロードされていません。あなたの「ExAws.S3.Client」モジュールはどこですか? – TheAnh

+0

@ TheAnhLe depsと 'applications:[phoenix、...:ex_aws、:httpoison、:poison]で十分だと思います。モジュールをロードする必要がある場合でもですか? –

+0

私は最新のリリースをチェックし、モジュール名は 'ExAws.S3.Client'ではありません。おそらく古いガイドバージョンに従います。 – TheAnh

答えて

0

:ex_awsを修正するための任意のヘルプは、あなたのモジュールMinion.S3のように行うために必要な古い(事前1.0.0)スタイルを使用していないために、私は感謝するでしょう。だからExAws.S3.Clientは存在しません。代わりに、試してみてください。

  1. をあなたのファイルを削除しconfig.exsで
  2. をs3.ex、config :minion, :ex_aws,からconfig :ex_aws,
  3. への変更は、新しいスタイルへのご要望を更新します。代わりに、古いスタイルのS3.list_buckets |> ExAws.request #=> {:ok, response}Minion.S3.list_buckets
関連する問題