2009/10/1 Robert Walker :
>
> Mauricio Szabo wrote:
>
>> But if you require 'open-uri':
>>
require 'open-uri'
>> => true
open("http://example.com/";).read
>> => "\r\n\r\n Example Web Page\r\n \r
>> \n \r\nYou have reached this web page by
>> typing"example.com",\r\n"example.net",\r\n
On Wed, Sep 30, 2009 at 7:08 PM, Robert Walker
wrote:
> Wow! This is a bad idea. Including a full page inside another page just
> makes my skin crawl. If I absolutely had to do something like this I
> would maybe grab the page using open(...), but then strip out only the
> contents inside the bod
Mauricio Szabo wrote:
> But if you require 'open-uri':
>
>>> require 'open-uri'
> => true
>>> open("http://example.com/";).read
> => "\r\n\r\n Example Web Page\r\n \r
> \n \r\nYou have reached this web page by
> typing"example.com",\r\n"example.net",\r\n or
> "example.org" into your web brows
Right on, that worked for me. Thanx so much!
On Sep 30, 12:16 pm, Mauricio Szabo wrote:
> You must require 'open-uri' to be able to open URLS. For example:
>
> >> open("http://example.com/";).read
>
> Errno::ENOENT: No such file or directory -http://example.com/
> from (irb):2:in `initia
You must require 'open-uri' to be able to open URLS. For example:
>> open("http://example.com/";).read
Errno::ENOENT: No such file or directory - http://example.com/
from (irb):2:in `initialize'
from (irb):2:in `open'
from (irb):2
But if you require 'open-uri':
>> requi
Eric Gruber wrote:
> What happened was I got the "We're sorry, but something went wrong."
> page from my
> app.
Yes, that's all you will get on the screen in dev mode. What's in the
log?
>
> I would prefer it all to be on one server, but the company I'm trying
> to do this for has many differ
What happened was I got the "We're sorry, but something went wrong."
page from my
app.
I would prefer it all to be on one server, but the company I'm trying
to do this for has many different projects, using different languages
on two different servers. I'd rather not include a copy on the second
What happened was I got the "We're sorry, but something went wrong."
page from my
app.
I would prefer it all to be on one server, but the company I'm trying
to do this for has many different projects, using different languages
on two different servers. I'd rather not include a copy on the second
Eric Gruber wrote:
> If there's some sort of risk, please inform.
I agree, this is a terrible idea from both performance and architectural
perspectives. Why do you want your navbar to live on another server?
>
> Not that it matters, that didn't work either.
What happened when you tried the o
I should clarify.
1. I control both servers that I'm working with, so the security risk
is practically nil.
2. The app is very small. Any performance hits I'd take by including a
remote file is acceptable.
That said, still don't have a fix.
Thanx.
Eric
On Sep 30, 11:17 am, Eric Gruber wrote:
If there's some sort of risk, please inform.
Not that it matters, that didn't work either.
On Sep 30, 11:13 am, John Barnette wrote:
> On Sep 30, 2009, at 9:06 AM, Eric Gruber wrote:
>
> > OK ... so is there another way to do it without using render?
>
> > Surely this isn't something that PHP c
On Sep 30, 2009, at 9:06 AM, Eric Gruber wrote:
> OK ... so is there another way to do it without using render?
>
> Surely this isn't something that PHP can do that Rails can't.
This is a terrible idea. But hey, here, have a loaded gun:
<%= open("http://example.com/navigation.html";).read %>
~
OK ... so is there another way to do it without using render?
Surely this isn't something that PHP can do that Rails can't.
On Sep 30, 11:04 am, Eric Gruber wrote:
> Right. That helps if the file I am using is locally. But what do I do
> if that file is from another server?
>
> On Sep 30, 11:02
Right. That helps if the file I am using is locally. But what do I do
if that file is from another server?
On Sep 30, 11:02 am, Greg Donald wrote:
> On Wed, Sep 30, 2009 at 11:00 AM, Eric Gruber wrote:
> > <%= render :partial => 'http://example.com/navigation.html'%>
>
> The partial file should
You can't do that. render works only with files local to your app.
Jason
On Wed, Sep 30, 2009 at 12:00 PM, Eric Gruber wrote:
>
> I tried that, with something like this:
>
>
> <%= render :partial => 'http://example.com/navigation.html' %>
>
> And I got the "We're sorry, but something went wrong
On Wed, Sep 30, 2009 at 11:00 AM, Eric Gruber wrote:
> <%= render :partial => 'http://example.com/navigation.html' %>
The partial file should be local to the Rails app.
--
Greg Donald
http://destiney.com/
--~--~-~--~~~---~--~~
You received this message because
I tried that, with something like this:
<%= render :partial => 'http://example.com/navigation.html' %>
And I got the "We're sorry, but something went wrong." page from my
app.
I am 100% positive the server I'm trying to include the file from
allows files to re used remotely.
On Sep 30, 10:48
On Wed, Sep 30, 2009 at 10:44 AM, Eric J. Gruber wrote:
>
> If I was to include a file (such as in a template) in php to use
> across a large number of pages, I would write this:
>
>
> In turn, every time I used this code, it would “include” (or better
> put, display) the content of navigation.h
18 matches
Mail list logo