Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Create the Final Popup #152

Open
ZMan84 opened this issue Jul 1, 2011 · 9 comments
Open

Can't Create the Final Popup #152

ZMan84 opened this issue Jul 1, 2011 · 9 comments

Comments

@ZMan84
Copy link

ZMan84 commented Jul 1, 2011

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

@davidmiani
Copy link
Contributor

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

@re4ctionary
Copy link

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

@beingsagir
Copy link

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 :)

@Heril
Copy link

Heril commented Apr 26, 2013

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.

@ghost
Copy link

ghost commented Aug 31, 2013

oh plz just write the answer i''m stuck!!

@anjerodesu
Copy link

It's like you guys didn't actually learnt anything. The tutorial is easy enough to understand..

@MarinoPoletine
Copy link

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.

@truncj
Copy link

truncj commented Feb 7, 2014

Restarting the tutorial fixed it! Thanks Heril

@baraka2000
Copy link

I can't get the Popup to work at all. Using chrome, Popup.goto "http://bing.com" doesn't even work??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants