2

I was following elixir getting started where it says run:

iex> i 'hello'

so I ran:

iex(1)> i 'hello'

and got:

 ** (CompileError) iex:2: undefined function i/1

elixir version:
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:4:4] [async-threads:10] [kernel-poll:false] Interactive Elixir (1.1.0-dev)

5
  • 1
    What version of Elixir did you install? Looks like you have an old version. Commented Nov 8, 2016 at 9:35
  • sudo apt-get install elixir on ubuntu: Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:4:4] [async-threads:10] [kernel-poll:false] Interactive Elixir (1.1.0-dev) Commented Nov 8, 2016 at 9:36
  • 1
    Yep, that's an old version. i was added in 1.2. Try installing the latest version using the instructions here: elixir-lang.org/install.html#unix-and-unix-like Commented Nov 8, 2016 at 9:39
  • @Dogbert thanx it's fixed :), you want to write the answer? or should I do it? Commented Nov 8, 2016 at 9:49
  • 1
    @yonatan you should accept Dogbert's answer for people who look at this in the future. Commented Nov 9, 2016 at 18:35

1 Answer 1

17

The function IEx.Helpers.i/1, which the guide you linked to uses, was added in Elixir 1.2.0. You need to install Elixir 1.2.0 or later version to use it.

see http://elixir-lang.org/install.html#unix-and-unix-like, for installation guide.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.