JILL24

JILL24

FunctionClauseError on running mix rustler.new (no function clause matching in OptionParser.validate_swit)

when i tried to run mix rustler.new

** (FunctionClauseError) no function clause matching in OptionParser.validate_switch/1

The following arguments were given to OptionParser.validate_switch/1:

    # 1
    :module

Attempted function clauses (showing 1 out of 1):

    defp validate_switch({_name, type_or_type_and_modifiers})

(elixir 1.13.4) lib/option_parser.ex:623: OptionParser.validate_switch/1
(elixir 1.13.4) lib/enum.ex:1593: Enum."-map/2-lists^map/1-0-"/2
(elixir 1.13.4) lib/option_parser.ex:599: OptionParser.build_config/1
(elixir 1.13.4) lib/option_parser.ex:231: OptionParser.parse/2
(rustler 0.22.2) lib/mix/tasks/rustler.new.ex:36: Mix.Tasks.Rustler.New.run/1
(mix 1.13.4) lib/mix/task.ex:397: anonymous fn/3 in Mix.Task.run_task/3
(mix 1.13.4) lib/mix/cli.ex:84: Mix.CLI.run_task/2

First Post!

msimonborg

msimonborg

are you calling mix rustler.new with any arguments?

Most Liked

al2o3cr

al2o3cr

@JILL24 This is a bug that was fixed in Rustler 0.23:

https://github.com/rusterlium/rustler/issues/412

msimonborg

msimonborg

You are on an older version of Rustler (0.22.2) where the mix rustler.new task appears incompatible with Elixir 1.13. See the changelog, specifically a fix in 0.23.0

Assuming you’re on Elixir 1.13, if you upgrade Rustler in your mix.exs {:rustler, "~> 0.25.0"} and run mix deps.update --all, then it should work

al2o3cr

al2o3cr

Hi @JILL24 - welcome to the Elixir forum!

We (the moderators) combined your posts into a single new thread as duplicate posting is against the forum rules.

In addition, consider opening a new thread when asking a mostly-unrelated question. The “mark as answered” feature doesn’t work if you add a new question to a months-old answered one.

Where Next?

Popular in Questions Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42716 114
New

We're in Beta

About us Mission Statement