Newbie .. nil object and missing something obvious

Yeah, the URL is probably getting you. The webserver is sending you the
file directly without running the controller first.

I’m pretty sure it will work without the extension.

On Monday, April 24, 2006, at 3:01 PM, Robert Sherwood wrote:

Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

_Kevin

Thanks to everyone for the help.

Okay, I’ve got an update from bizarro world. Someone kindly volunteered
to try the code in their environment, after failing to reproduce the
error. I zipped up the application, sent it over, and

It works; I get the dates displayed. I didn’t change anything at all,
so that’s absolute proof that the application code itself is not to
blame.

So now I’m going to go jump off a bridge… :slight_smile:

I will try the URL without the “.rhtml”, unfortunately, I’ll have to
wait 'til this evening after work.

Thanks again to everyone for your patience and assistance.

Hi –

On Mon, 24 Apr 2006, Robert Sherwood wrote:

So now I’m going to go jump off a bridge… :slight_smile:

I will try the URL without the “.rhtml”, unfortunately, I’ll have to
wait 'til this evening after work.

I can confirm that with the .rhtml, I get the same result you do. I
believe the problem is solved. (Except that, as another poster
pointed out, it’s kind of disconcerting that the view templates are
reachable this way at all.)

David


David A. Black ([email protected])
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

“Ruby for Rails” PDF now on sale! Ruby for Rails
Paper version coming in early May!

Hi Robert,

Robert Sherwood wrote:

Okay, I’ve got an update from bizarro world.
Someone kindly volunteered to try the code in
their environment, after failing to reproduce the
error. I zipped up the application, sent it over,
and <Drum roll please…

It works; I get the dates displayed. I didn’t
change anything at all, so that’s absolute proof
that the application code itself is not to
blame.

You appear to have a piece of code that exposes a config-specific bug in
RoR. I, for one, would be grateful if you could make the time to
document
your configuration and submit that and your code so that the bug can
either
be tracked down and fixed or a FAQ developed to warn folks off of using
that
config.

Best regards,
Bill

Actually, I can reproduce his problem using the standard cookbook app
that comes with InstantRails. At least in development mode, if you
request the .rhtml file, you will get it. I don’t know if production
mode closes this hole or not.

It does not seem to be anything specific to his own configuration.

On Monday, April 24, 2006, at 10:19 AM, Bill W. wrote:

using that
config.

Best regards,
Bill


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

_Kevin

Hi Kevin,

A couple of additional thoughts below…

Kevin O. wrote:

Actually, I can reproduce his problem using
the standard cookbook app that comes with
InstantRails. At least in development mode, if you
request the .rhtml file, you will get it. I don’t know
if production mode closes this hole or not.

It does not seem to be anything specific to his own
configuration.

Perfect! Not speaking for anybody but me… thanks much for making the
time
to test that. If the two of you could find a way to spend just a little
additional time on this, it would be great to validate something.

To both of you, what exactly is your system configuration? For Robert,
what
about your friend’s config. I ask because for the past week I have, and
still am, spending quite a bit of time testing / debugging a segment
fault
problem that’s specific, at least, to Windows 2000 Pro SP3 and SP4.
Can’t
get the problem to display itself on XP. That doesn’t mean it’s not a
bug.
It means that it’s a bug that only shows itself in a specific config.
It
either needs to be fixed, or if the effort to fix it for that config is
not
justified from a ‘market share’ perspective, then it at least needs to
be
documented. It may be that both you and Robert are running the same
config
and that his friend is running a different one. It would be good to
validate that this is not config-specific.

Independent of the results above, it seems to me we need ‘a call’ from
the
Rails core team as to this behavior. Is there a ‘better’ way than just
going ahead and submitting it as a bug?

Best regards,
Bill

It may be that Rails is ‘working as designed / intended’ and there’s
something that needs to be highlighted in the documentation. It may
already be documented, for example, that this is allowed in development
for
reason ‘X’ and that before moving a Rails app into production, we need
to do
‘A’, ‘B’, and ‘C’.

I’m using InstantRails on a WinXP machine.

As I said before, I don’t think this is a configuration dependent thing.

It does seem to happen for me in production mode, but I would appreciate
it if someone could verify that.

On Monday, April 24, 2006, at 11:11 AM, Bill W. wrote:

request the .rhtml file, you will get it. I don’t know
To both of you, what exactly is your system configuration? For
documented. It may be that both you and Robert are running the same

[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

_Kevin

As a follow up, I too can reproduce the ‘NoMethodError in
Recipe#list.rhtml’
by starting the cookbook app that comes with InstantRails by pointing
the
browser to ‘http://localhost:300/recipe/list.rhtml’. That’s
reproducible on
the two boxes I have here: WinXP - Home Addition and Win2K SP 4.

Tom M.,

You caught this. You should get the ‘glory’ (aka, ‘the extra work’ :wink:
)
You going to submit the bug report?

Best regards,
Bill

----- Original Message -----
From: “Bill W.” [email protected]
To: [email protected]
Sent: Monday, April 24, 2006 11:11 AM
Subject: Re: [Rails] Newbie … nil object and missing something

On Apr 24, 2006, at 9:36 AM, Bill W. wrote:

As a follow up, I too can reproduce the ‘NoMethodError in
Recipe#list.rhtml’ by starting the cookbook app that comes with
InstantRails by pointing the browser to ‘http://localhost:300/
recipe/list.rhtml’. That’s reproducible on the two boxes I have
here: WinXP - Home Addition and Win2K SP 4.

Tom M.,

You caught this. You should get the ‘glory’ (aka, ‘the extra
work’ :wink: ) You going to submit the bug report?

The glory belongs to the person who submits a patch to
fix it. :slight_smile:

http://dev.rubyonrails.org/ticket/4866


– Tom M.

Tom M. wrote:

http://dev.rubyonrails.org/ticket/4866
Or to the person who updates the wiki FAQs if that’s the decision by the
core team.

In any event, I’ve never been a big supporter of the “Lone Ranger” model
for
recognition / thanks. Personally speaking, I’ve always had / observed
better results from a team / credit-where-credit’s-due model. :wink:

Best regards,
Bill

Kevin O. wrote:

It does seem to happen for me
in production mode,

Ouch! Are you planning to update the ticket Tom entered?

but I would appreciate
it if someone could verify that.

+1

Best regards,
Bill

updated.

FYI, it’s ticket #4866
http://dev.rubyonrails.org/ticket/4866#preview

On Monday, April 24, 2006, at 12:57 PM, Bill W. wrote:

+1

Best regards,
Bill


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

_Kevin

Hi Robert,

Robert Sherwood wrote:

Would it still be useful for me to
post details of my environment?

If your config has already been accounted for, then probably not.

It seems pretty universally reproduceable,
so I’m not sure there’s significant benefit
in doing so.

What would be most valuable at this point, I think, is understanding
what
the config is on the system that did not exhibit the failure. From a
testing / debugging perspective, knowing both cases can significantly
reduce
the effort to understand / fix the problem.

Thanks again for making the time to report / drive this to ground. It
is,
IMHO, a real service to the community.

Best regards,
Bill

I doubt it will help much at this point.

On Monday, April 24, 2006, at 8:20 PM, Robert Sherwood wrote:

[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

_Kevin

What would be most valuable at this point, I think, is understanding
what
the config is on the system that did not exhibit the failure. From a
testing / debugging perspective, knowing both cases can significantly
reduce
the effort to understand / fix the problem.

That person was able to reproduce the problem by appending “*.rhtml” to
their call, just as I did. Originally, they had done the right thing and
called just “controller/action”, instead of “controller/action.rhtml”.
So it looks like a combination of user error, and unexpected system
behavior.

Newbie here…

Would it still be useful for me to post details of my environment? It
seems pretty universally reproduceable, so I’m not sure there’s
significant benefit in doing so.

My immediate suspicion is that his friend actually tried the standard
rails url (without the .rhtml), and that is why it worked for him.

On Monday, April 24, 2006, at 1:36 PM, Bill W. wrote:

so I’m not sure there’s significant benefit

Best regards,
Bill


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

_Kevin

Robert Sherwood wrote:

That person was able to reproduce
the problem by appending “*.rhtml” to
their call, just as I did.

Then, other than the production mode question, I’d say it’s in the core
team’s court.

Thanks again!
Bill