This help site has been deprecated. Please send your requests to support@rubygems.org

Supporter FAQ

Hi! This is mostly internal documentation, if you have any of these problems, please open up a support request!

In an attempt to lower our Bus Factor™, here's a list of common support issues and how to deal with them. Some of these should be fixed in Gemcutter itself as an admin functionality, some shouldn't, some just will always happen.

Preface

For any of these, you need SSH access. Once in, to get into the rails console:

cd /applications/rubygems/production/current
./script/rails console production

Merging Accounts

The support request asks for an old account to be merged with a new one, possibly to reclaim a user name or just merge two disconnected accounts. Always make sure the emails given have the same domain, or are owned by the same person first. If not, add both emails to the support thread and ask for a response from the other email to verify ownership.

First, look up both accounts:

>> u1 = User.find_by_email("someone@example.com")
=> #<User id: 2986, email: "...
> u2 = User.find_by_email("else@example.com")
=> #<User id: 5934, email: "...

Then, either:

Reclaiming a user name / handle

In this case u2 has the handle (foobar) we want set to u1. There's a unique constraint on this so it has to be done separately:

> u2.update_attribute :handle, nil
=> true
> u2.update_attribute :handle, "foobar"
=> true

Merging ownerships of gems

Check that the ownerships are same or not first...

> u1.rubygems.map(&:name)
=> ["Foo", "Bat"]
> u2.rubygems.map(&:name)
=> ["Foo", "Bar", "Baz"]

Looks like Bat is the only one to transfer to u2. Use whatever method you want here, just make sure you chose the correct ownership:

> u1.ownerships.find_by_rubygem_id(Rubygem.find_by_name("Bat").id).update_attribute :user_id, u2.id
=> true

Depending on what they want, you can clear the other ownerships or just leave the "old" account as is.

Deleting gems

MAKE SURE that this is a VALID case for deleting gems! See the FAQ here: http://help.rubygems.org/kb/gemcutter/removing-a-published-rubygem

Now that you still want to:

> index = Indexer.new
=> #<Indexer...
> names = Rubygem.find_by_name("babar").versions.map(&:full_name)
=> ["babar-0.0.2", "babar-0.0.1"]
> names.each { |n| RubygemFs.instance.remove("gems/#{n}.gem") }
=> #<struct Aws::S3::Types::DeleteObjectOutput delete_marker=true, version_id="79K1gUb27XfX13sTp2aW1vNEiBaZUqrT", request_charged=nil>
> names.each { |n| RubygemFs.instance.remove("quick/Marshal.4.8/#{n}.gemspec.rz") }
=> #<struct Aws::S3::Types::DeleteObjectOutput delete_marker=true, version_id="Ms61XAlIxdLg_9pzv3UAn72XaefqmzcH", request_charged=nil>
> Rubygem.find_by_name("babar").destroy
=> true

If you're only deleting ONE version, just seek to that version (Rubygem#versions is a scope) and hit #destroy on it.

Adding owners to a gem

You've got the email you want to add, let's say user@example.com to the Foo gem:

> u = User.find_by_email("user@example.com")
=> #<User id: 2986, email: "...
> r = Rubygem.find_by_name("Foo")
=> #<Rubygem id: 334, name: "...
> r.ownerships.create(:user_id => u.id, :approved => true)
=> #<Ownership id: 214151, ...

Specific gem issues

The support issue contains a call for help because one gem can't be installed, or a specific bug with a gem, perhaps in a compiler error or after it's installed. If this isn't a RubyGems specific problem, point the user towards the project's bug tracker.

This support site is not a bug tracker or issue list for every RubyGem out there, and we should forward users along to where maintainers of those gems can help them.