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

vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
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
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
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
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

We're in Beta

About us Mission Statement