
orville
From Ruby to Elixir: Stuck at the start (page 20)
I managed to install asdf, then erlang and elixir via asdf.
I was able to create and test the example Mix project (page 19) successfully.
I’m confused where to put the very first example: one.ex with two functions (hello/0 and welcome/1). The filenames given start with elixir_examples/lib so I assumed that ‘lib’ is the same lib directory created on page 19, and thus created the one.ex file in a new examples/modules directory. However, running iex as shown on page 21 generates a “function Examples.Modules.One.hello/0 is undefined (module Examples.Modules.One is not available)” error message. I am invoking $ iex -S mix from the same directory that contains lib and mix.exs.
I’ve played around for a couple hours and am stumped. Thanks in advance for a hint!
Popular Prag Prog topics










Other popular topics










Latest in PragProg
Latest (all)
Categories:
Popular Portals
- /elixir
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /clojure
- /react
- /quarkus
- /go
- /vapor
- /react-native
- /v
- /wasm
- /django
- /security
- /nodejs
- /centos
- /rails
- /haskell
- /fable
- /gleam
- /js
- /swift
- /deno
- /tailwind
- /assemblyscript
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /c-plus-plus
- /preact
- /flutter
- /actix
- /java
- /angular
- /ocaml
- /zig
- /kubuntu
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /html
- /keyboards
- /emacs
- /nim
- /vuejs
- /nerves
- /elm