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

Installing development dependencies #33

Open
afeld opened this issue May 26, 2011 · 8 comments
Open

Installing development dependencies #33

afeld opened this issue May 26, 2011 · 8 comments

Comments

@afeld
Copy link

afeld commented May 26, 2011

Running a gem's tests will usually require its development dependencies, so it would be great if there were an additional command to do so.

@capoferro
Copy link
Contributor

It should install them automatically. Do you want to do it manually sometimes?

@afeld
Copy link
Author

afeld commented May 26, 2011

It gives me back a "Please run 'bundle install'", and then prompts to submit my test results (even though they didn't successfully run). The gem I was trying is magickly, btw. Thanks!

@capoferro
Copy link
Contributor

Ah ok. Bundler isn't supported in rubygems-test, as it's not the preferred method of managing dependencies in a gem. Rubygems has built in support for managing development dependencies.

@afeld
Copy link
Author

afeld commented May 26, 2011

Ah ok I have a theory... my installed gem versions meet the requirements listed in the gemfile (as well as the Gemfile), but not the versions in the Gemfile.lock.

@erikh
Copy link

erikh commented May 26, 2011

Let us know what resolves this; I'm preparing a faq in my free time for users of bundler, rspec and other tools that aren't as obvious of how to set rubygems-test up.

@afeld
Copy link
Author

afeld commented May 27, 2011

Ok, so for v1.1.3 of magickly, I didn't have a version of rake set explicitly in my Gemfile, and the dependencies I explicitly listed only had 'rake' (without a version) in their dependencies. Bundler did, however freeze rake v0.9.0 into my Gemfile.lock, and my rake test uses Bundler, so it was looking for that version, even though I only had v0.8.7 installed. I am using Jeweler for the gem, but since I don't have rake in the Gemfile, it didn't put it in the generated gemspec.

Not sure the optimal path here - basically, the difficulty is the difference in how Bundler and Rubygems handle requirements.

@erikh
Copy link

erikh commented Jul 10, 2011

Sorry to get back to you so late on this, it's been a busy month. The rake issue is one we need to address and, well, I'm not quite sure how to handle that just yet, namely how rake is run from the command line.

So to summarize, the issue here is:

  • Your project requires rake 0.9.0
  • You have rake 0.8.7 installed in your main gems repo
  • ruby -S rake naturally runs the 0.8.7 version because bundle exec isn't called.

@afeld
Copy link
Author

afeld commented Jul 19, 2011

Right - since I don't want to force the users of my gem to use a particular version of rake, I don't have it explicitly specified in the gemspec.

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

3 participants