Open ZMan84 opened 13 years ago
That is only part of the code. The h2
and p
methods are only available inside a Popup.make
block. For example this will work:
Popup.make do
h2 "Some header"
end
While the following with cause a NoMethodError
:
h2 "Some header not in a Popup.make block
I don't want to spoil the learning process for you or anyone else that may have the same concern- so I won't just give you the answer. However, I will say this: the designers of this tutorial, basically, gave you "copy & paste"-able code throughout the entire course. At this point in the tutorial, you need to leverage the past exercises that you completed in order to complete the learning process.
Come on ZMan, you've gotten this far (and learned tons along the way!) don't give up the satisfaction of completion simply because it wasn't just handed to you.
Note: Read the section (the entire thing, not just the highlighted code).
Best of luck! R
that was an important part of that course
U need to follow the previous lesson u ve already learn into that course.
u just need to create a popup
inside that u need to use h1 for a nice name of your blog page,
and then use that prepared code along with a line which displays the time.
Happy Learning Bros :)
One thing to note, I was just skimming through the instructions at this point, so I missed that I had to come up with some of the code on my own. After making the mistake of just typing in the prewritten code, I would always get the NoMethod error for h2(which happened when making said error and every time I would try to call Popup.make. Restarting the tutorial fixed it.
oh plz just write the answer i''m stuck!!
It's like you guys didn't actually learnt anything. The tutorial is easy enough to understand..
TBH I can't either. But I am not getting errors. My problem is that popups are not working correctly with me. Even in the popup tutorial, it never worked. I am using Safari. At this point I don't know if I am an idiot or the popup is broken.
Restarting the tutorial fixed it! Thanks Heril
I can't get the Popup to work at all. Using chrome, Popup.goto "http://bing.com" doesn't even work??
Whenever I try to enter any of the code that is given when trying to create the final popup that displays the blog you've created, I get this error code: NoMethodError: undefined method `h2' for main:Object
Even when I use the little piece of code that is given: blog.each do |entry| h2 entry.title p entry.fulltext end ...I still get the same error.
So what method am I having issues with or, if that's not the issue, what am I doing wrong b/c I just spent all this time getting excited about Ruby and I want to see my darned final product.
Thanks all, Zach