For this you’ll need some help from the Ruby Standard Library Net::HTTP library.
Depending on where you’ll use it you need to add some requires and the easiest place is in your environment.rb
require "net/http"
require "uri"
Then you can use this to pull a remote file similar to what the URL wrappers provide for the PHP include and require functions:
Net::HTTP.get URI.parse("http://www.domain.com/external.html")
Use the get method if you’re in a view using <%=. There is also (as in the net::http docs example) a get_print method.