piotrmurach / tty

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

Error when creating new project with `teletype new PROJECT` from master #35

Closed hasanen closed 6 years ago

hasanen commented 6 years ago

In master, I build the gem and installed it

gem build tty.gemspec
gem install tty-0.7.0.gem

And then I tried to create new project

tmp  → teletype new test
Creating gem 'test'...
Code of conduct enabled in config
      create  test/Gemfile
      create  test/lib/test.rb
      create  test/lib/test/version.rb
      create  test/test.gemspec
      create  test/Rakefile
      create  test/README.md
      create  test/bin/console
      create  test/bin/setup
      create  test/.gitignore
      create  test/.travis.yml
      create  test/.rspec
      create  test/spec/spec_helper.rb
      create  test/spec/test_spec.rb
      create  test/CODE_OF_CONDUCT.md
      append  test/README.md
Invalid gemspec in [/Users/hasanen/.rvm/gems/ruby-2.4.2/gems/tty-0.7.0/tty.gemspec]: uninitialized constant TTY::VERSION
/Users/hasanen/.rvm/gems/ruby-2.4.2/gems/tty-0.7.0/lib/tty/plugins.rb:58:in `load_from': undefined method `runtime_dependencies' for nil:NilClass (NoMethodError)
        from /Users/hasanen/.rvm/gems/ruby-2.4.2/gems/tty-0.7.0/lib/tty/commands/new.rb:222:in `add_required_libs_to_gemspec'
        from /Users/hasanen/.rvm/gems/ruby-2.4.2/gems/tty-0.7.0/lib/tty/commands/new.rb:138:in `execute'
        from /Users/hasanen/.rvm/gems/ruby-2.4.2/gems/tty-0.7.0/lib/tty/cli.rb:111:in `new'
        from /Users/hasanen/.rvm/gems/ruby-2.4.2/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
        from /Users/hasanen/.rvm/gems/ruby-2.4.2/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
        from /Users/hasanen/.rvm/gems/ruby-2.4.2/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
        from /Users/hasanen/.rvm/gems/ruby-2.4.2/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
        from /Users/hasanen/.rvm/gems/ruby-2.4.2/gems/tty-0.7.0/exe/teletype:13:in `<top (required)>'
        from /Users/hasanen/.rvm/gems/ruby-2.4.2/bin/teletype:23:in `load'
        from /Users/hasanen/.rvm/gems/ruby-2.4.2/bin/teletype:23:in `<main>'
        from /Users/hasanen/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `eval'
        from /Users/hasanen/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `<main>'

Using ruby 2.4.2. Let me know if you need more details.

piotrmurach commented 6 years ago

Thanks for reporting this!

Do you have time to submit PR? Possibly when reading the gemspec require the version to load the missing constant?

hasanen commented 6 years ago

I think I could have time on weekend, I'll look into this.