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

have some questions... #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mikeadeleke
Copy link

I had some hiccups but this is what I have so far.

@jwo
Copy link
Member

jwo commented Dec 4, 2013

Did you get it hosted on heroku?

I don't think you're quite getting the website down, yet. I should be able to click on a button to randomize it, and see your likes.

Where are you running into confusion? More specifically, is there any code in the Sinatra app that is getting you bogged down?

@mikeadeleke
Copy link
Author

Yeah so two things:

  1. Apparently
    screen shot 2013-12-05 at 11 53 51 am
    I have a public key issue even though I have been pushing fine to this repo.
  2. The code in the Sinatra app that is a little confusing is how to call "rand()" on an array.

@jwo
Copy link
Member

jwo commented Dec 5, 2013

for the heroku auth issue, try heroku auth:login

The code in the Sinatra app that is a little confusing is how to call "rand()" on an array.

Let's say you have an array filled with 100 items.

array = (1..100).to_a
=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100] 

If we want to randomize them, you:

array.shuffle
=> [62, 4, 53, 12, 59, 74, 47, 1, 57, 40, 25, 46, 65, 98, 30, 49, 7, 14, 8, 73, 77, 29, 84, 85, 93, 68, 32, 91, 2, 21, 11, 100, 51, 23, 52, 79, 89, 6, 15, 9, 97, 10, 37, 27, 45, 36, 34, 63, 38, 17, 94, 13, 22, 71, 3, 19, 60, 82, 90, 5, 64, 58, 86, 31, 76, 18, 28, 88, 92, 67, 44, 72, 20, 96, 24, 33, 26, 66, 95, 56, 54, 41, 43, 35, 75, 70, 87, 42, 39, 81, 50, 83, 99, 16, 48, 78, 55, 61, 69, 80] 

So, to get a random item in an array, we'd shuffle and take the first item:

array = (1..100).to_a
array.shuffle.first
=> 25

HERE'S THE AWESOME: Ruby has a built in method

[6, 10, 57, 100, 240].sample
=> 57

Example: http://rubyfiddle.com/riddles/9b34c

@mikeadeleke
Copy link
Author

Thanks Jesse! I now have the array thing okay but

  1. I am failing to render it to my about page
  2. I think my publickey issue is actually with my repo

@jwo
Copy link
Member

jwo commented Dec 5, 2013

I think my publickey issue is actually with my repo

Nope--- you can push to github just fine. Need to push updates to heroku, which never touches your github repo.

@mikeadeleke
Copy link
Author

Hmmm just did again and things are still not working..
screen shot 2013-12-05 at 1 18 30 pm

Also, unsure why my "likes" are not rendering on my about page

@jwo
Copy link
Member

jwo commented Dec 5, 2013

are you doing heroku auth:login ?

and if so, does that user have access to the repo you created?

Also, unsure why my "likes" are not rendering on my about page

Update your github code (git push origin master) and I’ll take a look.

Jesse Wolgamott @ Comal Productions, Inc.
Web. Mobile. Design. Training.
@jwo
http://comalproductions.com

On Thursday, December 5, 2013 at 1:19 PM, Mike Adeleke wrote:

Hmmm just did again and things are still not working..
Also, unsure why my "likes" are not rendering on my about page


Reply to this email directly or view it on GitHub (#10 (comment)).

@mikeadeleke
Copy link
Author

Yeah I did with no joy...

I have access the repo and just pushed my changes. I do not know why I cannot work with heroku though..

@jwo
Copy link
Member

jwo commented Dec 5, 2013

I’m highly confident your app is linked to someone else’s account. Login to heroku and see if you can see your app listed.

Jesse Wolgamott @ Comal Productions, Inc.
Web. Mobile. Design. Training.
@jwo
http://comalproductions.com

On Thursday, December 5, 2013 at 1:36 PM, Mike Adeleke wrote:

Yeah I did with no joy...
I have access the repo and just pushed my changes. I do not know why I cannot work with heroku though..


Reply to this email directly or view it on GitHub (#10 (comment)).

@mikeadeleke
Copy link
Author

Did heroku auth:login again

screen shot 2013-12-05 at 1 42 16 pm
screen shot 2013-12-05 at 1 42 52 pm

@jwo
Copy link
Member

jwo commented Dec 5, 2013

ok, finally type in heroku apps from command line and post what you see.

Jesse Wolgamott @ Comal Productions, Inc.
Web. Mobile. Design. Training.
@jwo
http://comalproductions.com

On Thursday, December 5, 2013 at 1:43 PM, Mike Adeleke wrote:

Did heroku auth:login again


Reply to this email directly or view it on GitHub (#10 (comment)).

@mikeadeleke
Copy link
Author

screen shot 2013-12-05 at 2 49 10 pm

@jwo
Copy link
Member

jwo commented Dec 5, 2013

Ok, looks like you should go to heroku support. 

No idea what is wrong. 

Alternatively, destroy the heroku app, and try again.

On Thu, Dec 5, 2013 at 2:49 PM, Mike Adeleke [email protected]
wrote:

screen shot 2013-12-05 at 2 49 10 pm

Reply to this email directly or view it on GitHub:
#10 (comment)

@mikeadeleke
Copy link
Author

Just contacted Heroku and will let you know the updates. Thanks!

@mikeadeleke
Copy link
Author

Heroku and I have been going back and forth over the weekend. Nothing they say has been working unfortunately.

@jwo
Copy link
Member

jwo commented Dec 9, 2013

If I were you, I’d cut bait and try again.

Clone the github repo into another folder
create a new repo (heroku create)
push to heroku
voila

At least, I’m betting for #4.

On Monday, December 9, 2013 at 12:39 PM, Mike Adeleke wrote:

Heroku and I have been going back and forth over the weekend. Nothing they say has been working unfortunately.


Reply to this email directly or view it on GitHub (#10 (comment)).

@mikeadeleke
Copy link
Author

This is unbelievable. Started over in a new folder and still no joy. I am wondering if I have a deeper error.

@jwo
Copy link
Member

jwo commented Dec 9, 2013

Likely your ssh key is linked to the wrong user. maybe? possibly?

Jesse Wolgamott @ Comal Productions, Inc.
Web. Mobile. Design. Training.
@jwo
http://comalproductions.com

On Monday, December 9, 2013 at 12:52 PM, Mike Adeleke wrote:

This is unbelievable. Started over in a new folder and still no joy. I am wondering if I have a deeper error.


Reply to this email directly or view it on GitHub (#10 (comment)).

@jwo
Copy link
Member

jwo commented Dec 9, 2013

I would normally say it’s not worth it — but it probably is worth figuring out. You’ll likely use heroku a bunch.

alternative for now: try out http://nitrous.io

Jesse Wolgamott @ Comal Productions, Inc.
Web. Mobile. Design. Training.
@jwo
http://comalproductions.com

On Monday, December 9, 2013 at 12:53 PM, Jesse Wolgamott wrote:

Likely your ssh key is linked to the wrong user. maybe? possibly?

Jesse Wolgamott @ Comal Productions, Inc.
Web. Mobile. Design. Training.
@jwo
http://comalproductions.com

On Monday, December 9, 2013 at 12:52 PM, Mike Adeleke wrote:

This is unbelievable. Started over in a new folder and still no joy. I am wondering if I have a deeper error.


Reply to this email directly or view it on GitHub (#10 (comment)).

@mikeadeleke
Copy link
Author

I like this! But can I add a repo to it?

Take care,

Mike Adeleke
Co-founder at Domi
www.domiapp.co

College housing - the agony = Domi

On Mon, Dec 9, 2013 at 12:54 PM, Jesse Wolgamott
[email protected]:

I would normally say it’s not worth it — but it probably is worth figuring
out. You’ll likely use heroku a bunch.

alternative for now: try out http://nitrous.io

Jesse Wolgamott @ Comal Productions, Inc.
Web. Mobile. Design. Training.
@jwo
http://comalproductions.com

On Monday, December 9, 2013 at 12:53 PM, Jesse Wolgamott wrote:

Likely your ssh key is linked to the wrong user. maybe? possibly?

Jesse Wolgamott @ Comal Productions, Inc.
Web. Mobile. Design. Training.
@jwo
http://comalproductions.com

On Monday, December 9, 2013 at 12:52 PM, Mike Adeleke wrote:

This is unbelievable. Started over in a new folder and still no joy. I
am wondering if I have a deeper error.


Reply to this email directly or view it on GitHub (
#10 (comment)).


Reply to this email directly or view it on GitHubhttps://github.com//pull/10#issuecomment-30160578
.

@jwo
Copy link
Member

jwo commented Dec 9, 2013

Yes, you can clone from the command line.

Jesse Wolgamott @ Comal Productions, Inc.
Web. Mobile. Design. Training.
@jwo
http://comalproductions.com

On Monday, December 9, 2013 at 1:04 PM, Mike Adeleke wrote:

I like this! But can I add a repo to it?

Take care,

Mike Adeleke
Co-founder at Domi
www.domiapp.co (http://www.domiapp.co)

College housing - the agony = Domi

On Mon, Dec 9, 2013 at 12:54 PM, Jesse Wolgamott
<[email protected] (mailto:[email protected])>wrote:

I would normally say it’s not worth it — but it probably is worth figuring
out. You’ll likely use heroku a bunch.

alternative for now: try out http://nitrous.io

Jesse Wolgamott @ Comal Productions, Inc.
Web. Mobile. Design. Training.
@jwo
http://comalproductions.com

On Monday, December 9, 2013 at 12:53 PM, Jesse Wolgamott wrote:

Likely your ssh key is linked to the wrong user. maybe? possibly?

Jesse Wolgamott @ Comal Productions, Inc.
Web. Mobile. Design. Training.
@jwo
http://comalproductions.com

On Monday, December 9, 2013 at 12:52 PM, Mike Adeleke wrote:

This is unbelievable. Started over in a new folder and still no joy. I
am wondering if I have a deeper error.


Reply to this email directly or view it on GitHub (
#10 (comment)).


Reply to this email directly or view it on GitHubhttps://github.com//pull/10#issuecomment-30160578
.


Reply to this email directly or view it on GitHub (#10 (comment)).

@jwo
Copy link
Member

jwo commented Dec 9, 2013

Totally unsure.

Seems related to https://dashboard.heroku.com/account where SSH_KEYS are. Is there anything there?

Jesse Wolgamott @ Comal Productions, Inc.
Web. Mobile. Design. Training.
@jwo
http://comalproductions.com

On Monday, December 9, 2013 at 1:10 PM, Mike Adeleke wrote:

https://www.dropbox.com/s/wqwe680he1ylrtr/Screenshot%202013-12-09%2013.09.46.png
https://www.dropbox.com/s/4q8vhgrsfx0wu2w/Screenshot%202013-12-09%2013.09.54.png


Reply to this email directly or view it on GitHub (#10 (comment)).

@mikeadeleke
Copy link
Author

Yeah there is one assigned to my gmail. I'm surprised because I have used heroku often and rarely had issues - other than incompetence ;)

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

Successfully merging this pull request may close these issues.

2 participants