Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

teletype new rejects argument #79

Open
keithrbennett opened this issue Aug 26, 2021 · 11 comments
Open

teletype new rejects argument #79

keithrbennett opened this issue Aug 26, 2021 · 11 comments

Comments

@keithrbennett
Copy link

(This issue may be related to #78.)

teletype new does not seem to be getting the argument input on the command line. Here is the session:

> gem uninstall tty
Remove executables:
	teletype

in addition to the gem? [Yn]
Removing teletype
Successfully uninstalled tty-0.10.0


> gem install tty
Fetching tty-0.10.0.gem
Successfully installed tty-0.10.0
1 gem installed


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


> teletype new
ERROR: 'teletype new' was called with no arguments
Usage: 'teletype new PROJECT_NAME'
  • OS version: Mac OS Catalina
  • Ruby version: 3.0.2
  • TTY version: 0.10.0
@rngtng
Copy link

rngtng commented Sep 9, 2021

Same issue here, is it related to ruby 3.x version?

@keithrbennett
Copy link
Author

I don't know...when I try teletype new myproj on Ruby 2.7.3 after doing gem install tty, I get this:

/home/kbennett/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/rubygems/specification.rb:2247:in `raise_if_conflicts': Unable to activate tty-0.10.0, because bundler-2.1.4 conflicts with bundler (~> 1.16, < 2.0) (Gem::ConflictError)

@kronn
Copy link

kronn commented Sep 10, 2021

Same here, on Ubuntu 20.04:

> teletype new app
/home/USER/.asdf/installs/ruby/3.0.2/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)
...

@keilmillerjr
Copy link

keilmillerjr commented Jan 1, 2022

I have experienced the same unfortunate issue.

OS version: Arch Linux x86_64
Ruby version: 3.0.3 & 3.1.0
TTY version: 0.10.0

UPDATE: I can confirm, that installing and using ruby 2.6.6 will not exhibit the problem. This is the same issue as #78 (comment) and #50 relating to Bundler 2 incompatibility.

@sunilw
Copy link

sunilw commented Jan 5, 2022

Can confirm that this behaviour occurs with ruby 3.0.2 and teletype 0.10.0

@KagemniKarimu
Copy link

Having the same issue with Ruby 3.1.0!

@justingaylor
Copy link

I encountered the same with Ruby 3.0.3. I believe it is due to this change in Ruby 3+ which @piotrmurach and others addressed in some few places already:
piotrmurach/tty-command#56
piotrmurach/tty-command#52

I've fixed it in the below PR:
piotrmurach/tty-command#63

Once that's merged (or a similar fix) we should hopefully get this resolved! 🚀

@alec-c4
Copy link

alec-c4 commented Jan 7, 2023

Hey! Any news with this issue? As I see - PR isn't merged

@LostinTimeandspaceYT
Copy link

I am on Pop_Os! (Ubuntu 22.04) encountering the same issue:

My environment:

$ which ruby
/home/nathan/.asdf/shims/ruby
$ asdf --version
v0.10.0-77fd510

What I did to encounter the issue:

$ gem install tty
Fetching tty-0.10.0.gem
Successfully installed tty-0.10.0
Parsing documentation for tty-0.10.0
Installing ri documentation for tty-0.10.0
Done installing documentation for tty after 0 seconds
1 gem installed
$ teletype new markdown_reader
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
/home/nathan/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/tty-command-0.9.0/lib/tty/command.rb:54:in `initialize': wrong number of arguments (given 1, expected 0) (ArgumentError)
	from /home/nathan/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/tty-0.10.0/lib/tty/cmd.rb:33:in `new'
	from /home/nathan/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/tty-0.10.0/lib/tty/cmd.rb:33:in `command'
	from /home/nathan/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/tty-0.10.0/lib/tty/commands/new.rb:46:in `initialize'
	from /home/nathan/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/tty-0.10.0/lib/tty/cli.rb:128:in `new'
	from /home/nathan/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/tty-0.10.0/lib/tty/cli.rb:128:in `new'
	from /home/nathan/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	from /home/nathan/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	from /home/nathan/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	from /home/nathan/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
	from /home/nathan/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/tty-0.10.0/exe/teletype:14:in `<top (required)>'
	from /home/nathan/.asdf/installs/ruby/3.3.0/bin/teletype:25:in `load'
	from /home/nathan/.asdf/installs/ruby/3.3.0/bin/teletype:25:in `<main>'

A similar issue can be encountered when attempting to run teletype help

$ teletype help
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
    ┏━━━┓
 ┏━┳╋┳┳━┻━━┓
 ┣━┫┗┫┗┳┳┳━┫
 ┃ ┃┏┫┏┫┃┃★┃  Terminal apps toolkit
 ┃ ┗━┻━╋┓┃ ┃
 ┗━━━━━┻━┻━┛

Commands:
  teletype add COMMAND [SUBCOMMAND] [OPTIONS]  # Add a command to the application
  teletype help [COMMAND]                      # Describe available commands or one specific command
  teletype new PROJECT_NAME [OPTIONS]          # Create a new command line app skeleton
  teletype version                             # TTY version

Options:
      [--no-color]                 # Disable colorization in output
  -r, [--dry-run], [--no-dry-run]  # Run but do not make any changes
      [--debug], [--no-debug]      # Run in debug mode

@alec-c4
Copy link

alec-c4 commented Apr 24, 2024

@piotrmurach hey, could you please check this issue?

@keithrbennett
Copy link
Author

I have posted another issue at #88 suggesting that this gem be clearly marked as not intended for use, via prominent placement in readme and gem post-installation message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants