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

Suggest to install template instead of crash #179

Open
CognitiveDisson opened this issue Dec 11, 2016 · 2 comments
Open

Suggest to install template instead of crash #179

CognitiveDisson opened this issue Dec 11, 2016 · 2 comments

Comments

@CognitiveDisson
Copy link
Collaborator

I try to generate a module with template championat_viper. But I forget to add the template to Rambafile and I call install.
As a result I got a crash

/Users/vadim/.rvm/gems/ruby-2.3.0/gems/generamba-1.3.0/lib/generamba/helpers/template_helper.rb:25:in `obtain_path': Cannot find template named championat_viper! Add it to the Rambafile and run *generamba template install* (StandardError)
	from /Users/vadim/.rvm/gems/ruby-2.3.0/gems/generamba-1.3.0/lib/generamba/helpers/template_helper.rb:9:in `obtain_spec'
	from /Users/vadim/.rvm/gems/ruby-2.3.0/gems/generamba-1.3.0/lib/generamba/code_generation/module_template.rb:10:in `initialize'
	from /Users/vadim/.rvm/gems/ruby-2.3.0/gems/generamba-1.3.0/lib/generamba/cli/gen_command.rb:49:in `new'
	from /Users/vadim/.rvm/gems/ruby-2.3.0/gems/generamba-1.3.0/lib/generamba/cli/gen_command.rb:49:in `gen'
	from /Users/vadim/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
	from /Users/vadim/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /Users/vadim/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /Users/vadim/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /Users/vadim/.rvm/gems/ruby-2.3.0/gems/generamba-1.3.0/bin/generamba:5:in `<top (required)>'
	from /Users/vadim/.rvm/gems/ruby-2.3.0/bin/generamba:23:in `load'
	from /Users/vadim/.rvm/gems/ruby-2.3.0/bin/generamba:23:in `<main>'
	from /Users/vadim/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
	from /Users/vadim/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'

Instead of it would be cool to get a proposal for installation.

@etolstoy
Copy link
Member

@CognitiveDisson this crash has a descriptive error message: Cannot find template named championat_viper! Add it to the Rambafile and run *generamba template install* (StandardError). Isn't it enough?

@etolstoy
Copy link
Member

I see that you suggest to implement automatic installation of missing templates. It's a nice feature - but I think we should implement it in Generamba 2.0.

@etolstoy etolstoy added this to the v.2.0-alpha milestone Dec 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants