I have installed Elixir on my Opensuse Leap system using the docs from elixir-lang. And was learnig use of ex_doc but it isnβt installing the way mix deps.get should have . Installed through package manager but its not working. Kindly help
You can certainly install ex_doc
via mix, via something like
{:ex_doc, "~> 0.19", only: :dev, runtime: false}
It may be installed as an archive. You can check installed archives with mix archive
. If you wish to uninstall it you can use mix archive.uninstall <archive>
I actually did that before trying to install from package manager. Exdoc. 0.19 version requires Elixir 1.17 version. Zyapper installs elixir 1.6.
Then you want an earlier version. From the changelog there is a notice: βThis release requires Elixir v1.7 and later. For earlier Elixir versions, use ExDoc ~> 0.18.0.β
Therefore you should use this in your deps:
def deps
[
...other deps
{:ex_doc, "~> 0.18.0", only: :dev, runtime: false},
]
end
I actually did that giving multiple different version(0.12, 0.18.0, 0.18.4) of ex_doc before installing it from the system software using this Opensuse ex_doc
Now I removed ex_doc from the system software and reinstalled mix. But getting the same issue as before.
>mix deps.get
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
earmark 1.2.5
New:
ex_doc 0.18.4
* Updating ex_doc (Hex package)
Request failed (:timeout)
If this happens consistently, adjust your concurrency and timeout settings:
HEX_HTTP_CONCURRENCY=1 HEX_HTTP_TIMEOUT=120 mix deps.get
** (Mix) Package fetch failed and no cached copy available (https://repo.hex.pm/tarballs/ex_doc-0.18.4.tar)
I even tried to give github specific path so that it picks up the right version, but itβs not accepting and giving the above error. Or doesnβt connect.
This seems to indicate some type of firewall issue. Perhaps you are behind a restrictive corporate firewall? Can you directly download https://repo.hex.pm/tarballs/ex_doc-0.18.4.tar from this computer?
I actually did download the ex_doc and wasnβt sure how to use that. Tried to check on elixir-lang IRC but couldnβt get much help. So thought to reach here. I still do have ex_doc-0.18.4.tar file with me. How to use that for my project than.
Untar it into deps
of your application.
It then should have roughly the following structure:
.
|-lib
|-deps
| |-earmark
| \-ex_doc
|-priv
\-tests
Perhaps Iβm missing some of the default folders, perhaps I misspelled them, but the important bits are in deps
anyway.
ex_docfil> tree
.
βββ CHECKSUM
βββ contents.tar.gz
βββ metadata.config
βββ VERSION
0 directories, 4 files
and when extracted the content tar file. I got this
ex_docfil> tree
.
βββ CHANGELOG.md
βββ CHECKSUM
βββ contents.tar.gz
βββ formatters
β βββ epub
β β βββ dist
β β β βββ app-bbb6f0765d.js
β β β βββ epub-612b95d9a4.css
β β βββ metainfo
β β βββ com.apple.ibooks.display-options.xml
β β βββ container.xml
β βββ html
β βββ dist
β β βββ app-480ffdc169.css
β β βββ app-9bd040e5e5.js
β β βββ app-9bd040e5e5.js.map
β βββ fonts
β βββ icomoon.eot
β βββ icomoon.svg
β βββ icomoon.ttf
β βββ icomoon.woff
βββ lib
β βββ ex_doc
β β βββ cli.ex
β β βββ formatter
β β β βββ epub
β β β β βββ assets.ex
β β β β βββ templates
β β β β β βββ content_template.eex
β β β β β βββ extra_template.eex
β β β β β βββ head_template.eex
β β β β β βββ media-types.txt
β β β β β βββ module_template.eex
β β β β β βββ nav_item_template.eex
β β β β β βββ nav_template.eex
β β β β β βββ title_template.eex
β β β β β βββ toc_item_template.eex
β β β β βββ templates.ex
β β β βββ epub.ex
β β β βββ html
β β β β βββ assets.ex
β β β β βββ autolink.ex
β β β β βββ templates
β β β β β βββ api_reference_entry_template.eex
β β β β β βββ api_reference_template.eex
β β β β β βββ detail_template.eex
β β β β β βββ extra_template.eex
β β β β β βββ footer_template.eex
β β β β β βββ head_template.eex
β β β β β βββ module_template.eex
β β β β β βββ not_found_template.eex
β β β β β βββ redirect_template.eex
β β β β β βββ search_template.eex
β β β β β βββ sidebar_template.eex
β β β β β βββ summary_item_template.eex
β β β β β βββ summary_template.eex
β β β β βββ templates.ex
β β β βββ html.ex
β β βββ group_matcher.ex
β β βββ markdown
β β β βββ cmark.ex
β β β βββ earmark.ex
β β βββ markdown.ex
β β βββ retriever.ex
β βββ ex_doc.ex
β βββ mix
β βββ tasks
β βββ docs.ex
βββ LICENSE
βββ metadata.config
βββ mix.exs
βββ README.md
βββ VERSION
Those were the files inside ex_doc-0.18.4.tar
Ah, okay, then I previously misunderstood how the tarbal is built. The content of contents.tar.gz has to be in deps/ex_doc
.
Iβm still wondering why you were able to download earmark, but not ex_docβ¦ Both are served via hexβ¦