Skip to content

in save': undefined method each' for nil:NilClass (NoMethodError) #66

@gutenye

Description

@gutenye

code

authenticated do 
  repo = Repository.find(:name => "learn_ibus", :user => "gutenye")
  repo.description="hello"
  repo.save
end

error

/usr/lib/ruby/gems/1.9.1/gems/octopi-0.4.4/lib/octopi/base.rb:47:in `save': undefined method `each' for nil:NilClass (NoMethodError)
from /home/guten/a/a.rb:13:in `block in <main>'
from /usr/lib/ruby/gems/1.9.1/gems/octopi-0.4.4/lib/octopi.rb:36:in `block in authenticated'
from /usr/lib/ruby/gems/1.9.1/gems/octopi-0.4.4/lib/octopi.rb:65:in `authenticated_with'
from /usr/lib/ruby/gems/1.9.1/gems/octopi-0.4.4/lib/octopi.rb:35:in `authenticated'
from /home/guten/a/a.rb:9:in `<main>'

@keys is always nil

$ grep -R '@keys' /usr/lib/ruby/gems/1.9.1/gems/octopi-0.4.4/lib/  
/usr/lib/ruby/gems/1.9.1/gems/octopi-0.4.4/lib/octopi/base.rb:      @keys.each { |k| hash[k] = send(k) }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions