piotrmurach / tty

Toolkit for developing sleek command line apps.
https://ttytoolkit.org
MIT License
2.5k stars 78 forks source link

teletype new app -> wrong number of arguments (given 1, expected 0) #75

Closed roelandxyz closed 3 years ago

roelandxyz commented 3 years ago

Describe the problem

Creating a new app fails

Steps to reproduce the problem

teletype new app

Actual behaviour

/Users/roeland/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/tty-command-0.9.0/lib/tty/command.rb:54:in `initialize': wrong number of arguments (given 1, expected 0) (ArgumentError)
    from /Users/roeland/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/tty-0.10.0/lib/tty/cmd.rb:33:in `new'
    from /Users/roeland/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/tty-0.10.0/lib/tty/cmd.rb:33:in `command'
    from /Users/roeland/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/tty-0.10.0/lib/tty/commands/new.rb:46:in `initialize'
    from /Users/roeland/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/tty-0.10.0/lib/tty/cli.rb:128:in `new'
    from /Users/roeland/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/tty-0.10.0/lib/tty/cli.rb:128:in `new'
    from /Users/roeland/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
    from /Users/roeland/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/roeland/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
    from /Users/roeland/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
    from /Users/roeland/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/tty-0.10.0/exe/teletype:14:in `<top (required)>'
    from /Users/roeland/.rbenv/versions/3.0.0/bin/teletype:23:in `load'
    from /Users/roeland/.rbenv/versions/3.0.0/bin/teletype:23:in `<main>'

Expected behaviour

shouldn't fail

Describe your environment

piotrmurach commented 3 years ago

Hi Roeland 👋

Thanks for trying tty gem out.

The v0.10.0 version is horribly out of date. But, all the tty components have been updated so please could you use the master branch for now to generate a CLI app? I will make a new release soon but for the time if you could use the master branch I'd be grateful.

Please bear in mind that once your CLI is generated you shouldn't depend on the tty gem for your dependencies but instead require directly what you need from tty components list. All the components will be generated and commented out in your .gemspec file for you to use.

Hope this helps.

lxmrc commented 3 years ago

I'm having this problem too. I'm installing tty with gem install tty as per the README. Could you please explain how to use the master branch?

lxmrc commented 3 years ago

Never mind I figured it out.

Clone the repo: git clone https://github.com/piotrmurach/tty.git

Change directory: cd tty

Build the gem: rake build

Install it: gem install ./pkg/tty-0.10.0.gem

piotrmurach commented 3 years ago

@lxmrc This is one way to use code from the master branch. Another way, you could use bundler.

In your Gemfile specify tty gem like this:

gem "tty", git: "https://github.com/piotrmurach/tty.git"

and then install it with bundle install and use bundle exec teletype ....

simonc commented 1 year ago

Hi there 👋 Any plans of a new release in 2023. I just installed tty following the main website and got this issue 😬

Let me know if I can help ❤️

davispuh commented 6 months ago

Same here, that's crazy and gives bad impression of tty. Is it maintained? Should I use something else?

$ gem install tty
$ teletype new app
tty-command-0.9.0/lib/tty/command.rb:54:in `initialize': wrong number of arguments (given 1, expected 0) (ArgumentError)

Last release in September 30, 2019 ...