You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to import gems locally is throwing an error:
NoMethodError: undefined method `owner' for an instance of User (NoMethodError)
/Users/bradly/code/archive/rubygems.org/app/models/pusher.rb:11:in `initialize'
/Users/bradly/code/archive/rubygems.org/lib/tasks/gemcutter.rake:21:in `new'
In the rake take we pass a new user instance to the Pusher initializer:
Thanks for the report @bradly. Today it is recommended to use seed instead (which creates gems also). Would you mind to open PR to check for the users from seed to be present (for example gem owner one) and raise with friendly message explaining please first run the seed. And use the seed data to push the gems?
Trying to import gems locally is throwing an error:
In the rake take we pass a new user instance to the Pusher initializer:
rubygems.org/lib/tasks/gemcutter.rake
Line 21 in d5ec157
But in the Pusher class we are expecting an
api_key
and calling owner on it.rubygems.org/app/models/pusher.rb
Lines 9 to 11 in d5ec157
Steps to Reproduce
Expected Behavior
Gems should be imported
Current Behavior
Error calling
.owner
on a User instancePossible Solution
Change the rake task to pass an api key instance instead of a user instance
The following worked but felt a little sketchy. Is there a better solution?
Environment
RubyGems version: latest code frommaster
The text was updated successfully, but these errors were encountered: