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

Most Liked

al2o3cr

al2o3cr

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

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

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
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
Phillipp
Hey, I have a NanoPi-M3 and try to install Elixir on their Ubuntu image. I followed the Raspberry Pi installation instructions from the ...
New
Fl4m3Ph03n1x
Background Let’s assume I have a typical GenServer that receives messages as requests, does some operation in a DB and returns responses....
New
gonzofish
I’m currently trying to understand how to join three tables using Ecto. All the examples I’ve seen use 2, so maybe I’m just missing somet...
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
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

Other popular topics Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New

We're in Beta

About us Mission Statement