doomspork / artifact

File upload and on-the-fly processing for Elixir
Apache License 2.0
44 stars 2 forks source link

failed to start child Artifact.Storage #3

Closed TalMeser closed 8 years ago

TalMeser commented 8 years ago

Hey there,

Really keen to use this library! Somewhat unsure what I am doing wrong but on following installation I get this:

* (Mix) Could not start application app: App.start(:normal, []) returned an error: shutdown: failed to start child: Uploader.Supervisor * (EXIT) shutdown: failed to start child: Artifact.Storage * (EXIT) an exception was raised: * (UndefinedFunctionError) undefined function nil.init/1 nil.init([name: Uploader.Storage]) (stdlib) gen_server.erl:328: :gen_server.init_it/6 (stdlib) proc_lib.erl:240: :proc_lib.init_p_do_apply/3

Maybe you could help point me in the right direction?

Cheers

doomspork commented 8 years ago

Hi @TalMeser, I'm keen to help you use Artifact, the more the merrier! Would it be possible to share the module you use Artifact in and your supervisor config?

doomspork commented 8 years ago

@TalMeser I stepped through the code to trace your error and I'm wondering if you're missing part of your config. Do you have something like this in your config/config.exs?:

config :your_otp_app, Uploader.Storage,
  type: Artifact.Storage.Local,
  storage_dir: Path.expand("../test/tmp", __DIR__)
TalMeser commented 8 years ago

@doomspork You legend! Sorry I seem to have forgotten to change :artifact to :my_otp_app in the latter 2 config parts. Cheers for your quick help!

doomspork commented 8 years ago

:tada:

Let me know if you have any other questions or problems :grinning: You can ping me on Slack as well, I'm seanc on there.

doomspork commented 8 years ago

@TalMeser I noticed the README was wrong which may be why you ran into the issue you did. I'm going to fix that today :grinning:

Looking forward to your thoughts and feedback! :+1:

TalMeser commented 8 years ago

Cheers @doomspork! Really great stuff. Working well so far :smile: