Rubyで相対URLから絶対URLを求める
URIというライブラリを使う
require 'uri' URI::join('http://example.com/a/b/foo.html','bar.html').to_s #=> http://example.com/a/b/bar.html
URIというライブラリを使う
require 'uri' URI::join('http://example.com/a/b/foo.html','bar.html').to_s #=> http://example.com/a/b/bar.html