Please help in solving the problem. Maybe I did something wrong or maybe I forgot to preinstall anything.
I took the code from the textbook:
require 'open-uri' open('http://pragprog.com') do |f| puts f.read.scan(/<img alt=".*?" src="(.*?)"/m).uniq[0,3] end knocks error:
C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/open-uri.rb:223:in `open_loop': redirection forbidden: http://pragprog.com -> https://pragprog.com/ (Runti meError) from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/open-uri.rb:149:in `open_uri' from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/open-uri.rb:688:in `open' from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/open-uri.rb:34:in `open' from ./lib/methods.rb:123:in `<main>'