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
In certain situations, 1.5.1 adds duplicate dependency declarations to the gemspec #152
Comments
I think I have found a slight variation in this... I am building an engine gem, so I have a full Rails 3 app in my gem (for testing) in /spec_env, in spec_env, I include the gem I am building as a dependency in /spec_env/Gemfile with a path of '../' Then I list my actual gem dependencies in my Rakefile, whilst using gemspec in my gems Gemfile (woah) This seems to have the adverse effect that running rake gemspec creates a gem that depends on itself... Of course, it could me me doing something odd, or downright wrong, but it does seem to be happening none the less... |
I have been unable to install my own gems ever since upgrading to Rubygems 1.5 File: roles_active_record-0.4.6.5.gem Executing "ruby -S gem install ./pkg/roles_active_record-0.4.6.5.gem": ruby -S gem install ./pkg/roles_active_record-0.4.6.5.gem ERROR: While executing gem ... (ArgumentError) undefined class/module YAML::PrivateType Same error if installing via $ gem install pkg/roles_active_record-0.4.6.5.gem Any ideas how to go about this!? I am running Ruby 1.9.2-p386 on Mac OSX 10.6 (Snow) |
@snusnu that's right, dependencies should be only defined in the Gemfile. The generated Rakefile has been updated to reflect this, so marking it as fixed. There's not a ton I can do for existing projects though. @kristianmandrup that's a bug with ruby 1.9 and rubygems 1.5.0. It should be fixed in newer 1.5.x releases of rubygems. |
Got some tips from reading Jeweler issue [#152](technicalpickles/jeweler#152), so decided to remove the link to the gemspec from the Gemfile, and have all the necessary dependencies in the Gemfile
@technicalpickles This advice runs counter to the README.md Dependencies section
|
There is an issue with the documentation, and I will take a look at this shortly. |
If 1.5.1 sees a Gemfile, it puts the dependencies found in the
:production
and:development
groups into the generated.gemspec
. However, if those same dependencies are also declared in a Rakefile inside aJeweler::Tasks.new
definition, jeweler ends up listing the same dependencies twice in the.gemspec
file it generates.The workaround is to only put the dependency declarations into one place for now. So if the project has a Gemfile, the easiest thing to do is to just remove the dependency declarations from the Rakefile.
The text was updated successfully, but these errors were encountered: