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

'learn' command throws error #9

Closed
kwebster2 opened this issue Jun 14, 2017 · 0 comments
Closed

'learn' command throws error #9

kwebster2 opened this issue Jun 14, 2017 · 0 comments
Labels

Comments

@kwebster2
Copy link

kwebster2 commented Jun 14, 2017

@Lukeghenco
learn command throws the following error when using the IDE:

/Users/kevinwebster/.rvm/gems/ruby-2.3.1/gems/learn-test-2.4.0/lib/learn_test/strategies/mocha.rb:49:in `results': undefined method `[]' for nil:NilClass (NoMethodError)
	from /Users/kevinwebster/.rvm/gems/ruby-2.3.1/gems/learn-test-2.4.0/lib/learn_test/runner.rb:68:in `push_results'
	from /Users/kevinwebster/.rvm/gems/ruby-2.3.1/gems/learn-test-2.4.0/lib/learn_test/runner.rb:19:in `run'
	from /Users/kevinwebster/.rvm/gems/ruby-2.3.1/gems/learn-test-2.4.0/bin/learn-test:60:in `<top (required)>'
	from /Users/kevinwebster/.rvm/gems/ruby-2.3.1/bin/learn-test:22:in `load'
	from /Users/kevinwebster/.rvm/gems/ruby-2.3.1/bin/learn-test:22:in `<main>'
	from /Users/kevinwebster/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
	from /Users/kevinwebster/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'

The root cause is that mocha-multi is missing from the lab's dependencies, so the results are not being output to the .results.json file.

When running learn locally with npm installed, the learn-test mocha strategy automatically checks for the mocha-multi dependency and installs it via npm if it does not exist, so it is not an issue.

Also, as a side note, the learn-test command is not using the "test" script specified in package.json - it is instead running the command referenced in the below issue.

Similar issue and solution/explanation here:
learn-co-curriculum/quote-maker-react-lab#2

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

No branches or pull requests

3 participants
@Lukeghenco @kwebster2 and others