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

Dependencies should be listed as such, as long as doc refers to scaffold mechanism #233

Open
fwolfst opened this issue Sep 27, 2015 · 3 comments
Assignees

Comments

@fwolfst
Copy link
Contributor

fwolfst commented Sep 27, 2015

Hi,

I had trouble running the vedeu scaffold stack, as the vedeu command needs all of the development_dependencies if I get it right.

That would be fine, but there is no proper documentation (yet) about how to use the "API"-kind of vedeu; the README and docs refer to the vedeu command. Thus, just following the README does not yield in a nice experience if you are missing some gems (otherwise correctly) listed as development dependencies. It yields to errors similar to the one I pasted below.

Now that I think about it I guess the cleaner way would be to make vedeu not require these gems in the first place.

It follows the error message I see after running vedeu new vt. Oh and btw don't worry, I do have minitest installed, just not that version :)
And should I file an issue for that too? I would put trust that most of the gems - and especially the "big ones" vedeu uses - nowadays use semantic versioning, thus a s.add_dependency "minitest", "~> 5.8" should be cool.

Thanks for your efforts!
Felix

fatal: Not a git repository (or any of the parent directories): .git /home/felix/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/resolver.rb:347:in block in verify_gemfile_dependencies_are_found!': Could not find gem 'minitest (= 5.8.1) ruby' in any of the gem sources listed in your Gemfile or available on this machine. (Bundler::GemNotFound)
from /home/felix/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/resolver.rb:325:in each' from /home/felix/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/resolver.rb:325:in verify_gemfile_dependencies_are_found!'
from /home/felix/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/resolver.rb:198:in start' from /home/felix/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/resolver.rb:182:in resolve'
from /home/felix/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/definition.rb:200:in resolve' from /home/felix/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/definition.rb:140:in specs'
from /home/felix/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/definition.rb:185:in specs_for' from /home/felix/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/definition.rb:174:in requested_specs'
from /home/felix/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/environment.rb:18:in requested_specs' from /home/felix/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:13:in setup'
from /home/felix/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler.rb:127:in setup' from /home/felix/.rvm/gems/ruby-2.2.2/gems/vedeu-0.6.17/bin/vedeu:16:in <top (required)>'
from /home/felix/.rvm/gems/ruby-2.2.2/bin/vedeu:23:in load' from /home/felix/.rvm/gems/ruby-2.2.2/bin/vedeu:23:in

'
from /home/felix/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in eval' from /home/felix/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in <`

@gavinlaking
Copy link
Owner

Hi!

Thanks for the bug report- I wasn't aware this was happening. :-(

As far as I am aware, Vedeu only depends on bundler, rake and vedeu_cli to run, the development dependencies should be inconsequential. I've just pushed a new version of both vedeu and vedeu_cli, just incase they were somehow out of sync.

I'll investigate this issue shortly and report back on my findings.

Gav

@fwolfst
Copy link
Contributor Author

fwolfst commented Sep 28, 2015

As the error points to bin/vedeu:16 it seems to me that Bundler.setup gets the evil things going.
The documentation is at http://bundler.io/v1.10/bundler_setup.html (maybe it should be Bundler.setup(:default)?).

Quick update: Removing Bundler.setup from bin/vedeu:16 and require 'bundler/setup' (which do nearly the same thing afaiu) from lib/vedeu.rb:4 "resolves" the issue for me. It doesnt seem the clean solution, because I had no idea what I was really doing, but maybe it gives you pointers. Wouldnt it be enough to require bundler? I also do not understand why you need to play around with the load path in bin/vedeu. I usually work with bundle exec in my development workflow, and for deployed versions something like that (the loadpath fiddling) isnt needed in my understanding (if the gemspec is setup correctly). Similar for lib/vedeu.rb . Do you have these lines to be able to ruby bin/vedeu ?

@gavinlaking
Copy link
Owner

Originally, Vedeu did not have Bundler as a dependency and so the load path code ensured Vedeu was available to run if I remember correctly. I've merged your pull request (thanks for the contribution!), but will continue to investigate this area as it might have some pitfalls for other people wanting to use Vedeu.

Thanks again,

Gav

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