Linked Questions

Popular Questions

I have a question with respect to some of my code for a rubygem

Asked by At

I am getting this issue with some of my code.

scraper.rb:14:in `block (2 levels) in scrape_movieinfo':  undefined method `slice!' for nil:NilClass (NoMethodError)
        from /usr/local/rvm/gems/ruby-2.3.1/gems/nokogiri-1.10.1/lib/nokogiri/xml/node_set.rb:238:in `block in each'
        from /usr/local/rvm/gems/ruby-2.3.1/gems/nokogiri-1.10.1/lib/nokogiri/xml/node_set.rb:237:in `upto'
        from /usr/local/rvm/gems/ruby-2.3.1/gems/nokogiri-1.10.1/lib/nokogiri/xml/node_set.rb:237:in `each'
        from /home/empathetic-file-5230/temporary/Project1/Best50Films2018/lib/Best50Films2018/scraper.rb:12:in `block in scrape_movieinfo'
        from /usr/local/rvm/gems/ruby-2.3.1/gems/nokogiri-1.10.1/lib/nokogiri/xml/node_set.rb:238:in `block in each'
        from /usr/local/rvm/gems/ruby-2.3.1/gems/nokogiri-1.10.1/lib/nokogiri/xml/node_set.rb:237:in `upto'
        from /usr/local/rvm/gems/ruby-2.3.1/gems/nokogiri-1.10.1/lib/nokogiri/xml/node_set.rb:237:in `each'
        from /home/empathetic-file-5230/temporary/Project1/Best50Films2018/lib/Best50Films2018/scraper.rb:8:in `scrape_movieinfo'
        from /home/empathetic-file-5230/temporary/Project1/Best50Films2018/lib/Best50Films2018/cli.rb:6:in `run'
        from bin/Best50Films2018:3:in `<main>'

Related Questions