Are not easy to write, no :
You can tell by lame.
Ok, that might be a bit of a stretch, but I think it’s an appropriately silly start to my Heroku knowledge! Today, I will learn to use Heroku, a platform-as-a-service (PaaS) cloud application that, as far as I can tell so far, acts as a sort of auxiliary server for development.
I am going to start on the quickstart and then moved on to the headier document entitled How Heroku Works. I’ll be documenting my process in this entry, so, stay tuned! (I’m talking to YOU, happy-hour-free loner out there!)
Ok, first update, I’m finally putting git onto my machine. It was (or at least seemed) awkward on windows, since the command line is just a whole other beast over there, so now I’ve got it on the linux end. fabulous; all I did was type
git into bash & it said “if you want to download this just type sudo apt-get git” and that is so amazingly helpfully easy. I think this will be a whole new reason to use github, which I haven’t been doing for a while because I’ve been so into the CLI lately and I only ever used github’s browser interface. Progress, of a type!
And now I’m trying to flash-dash convert a python program I wrote in 3.3 to 2.7!
raw_input is weird! ok, a half hour later & I’ve got that locked down, the differences between which you can see at its github repository.
And now I’ve got the heroku toolbelt for linux on the machine, here. Why why why does it seem so much more approachable on linux? Why is the scrolling text of installation so very comforting to me? Why, indeed, is the sky blue. I actually did the boneheaded thing of accidentally typing my master pw in with capslock on, really! so that is a funny/dumb thing for me to have to remember. [edit: since fixed] and with my successfully converted python 2.7 program, which I have cloned to my system via the heroku dashboard helpful page, I’m now on the
git push heroku master, the entire logistics of which I am as yet unsure.
Ah crum. it went through the git push heroku master, counting objects, compressing them, writing them, and THEN it has said
Push rejected, no Cedar-supported app detected
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'firstname.lastname@example.org:stormy-scrubland-8935.git'
but doing the
heroku open still worked just fine. I do not know what cedar nor “stormy-scrubland” mean, though I’m guessing the latter is some kind of version of cedar, or some version of heroku. it seems like that kind of cute hacker convention in line with “llooming llama ubuntu” or whatever the L was called, ha ha! edit: ok, weird.
stormy-scrubland-8935 is the name of my app on heroku? somehow? that’s an odd name generator. [edit: I think that this is because I did not create a heroku environment before pushing the git change, with a quick
heroku create beforehand.]
Now I’ll be installing Flask, required on the Getting Started [in heroku] With Python page. It says to have pip, virtualenv, and of course, python installed in advance. I have already installed these items, so that is fortunate. Now, I’ve activated the virtual environment (venv), and while I’m glad to know that I can’t borf (borf is a VERY technical term) my computer irrevocably while within the virtual env, I am Worried that I have already done so, & that with any programming & new set of tools to download, I should have already been putting it all in a virtual environment. BLAST. ok, now I need to find out if my entire environment is salvageable, haha! I have heard about this linux problem, that is to say, when you start a new project but instead end up necessitating a machine-wide wipe and OS reinstall. Oh jeez. Ok!
And now I’ve figured out virtualenv. It was giving me tons of crazy errors, like “nothing in “*”” which means that there was nothing in the indicated path, as that’s what the asterisk means, and also “nothing of *.pyo” and “nothing of *.pyc” which are python compiler file extensions, so I got out of the virtualenv I’d made above & deleted it, and started over using
virtualenv venv --distribute --no-site-packages. then it worked! now, whenever I’m screwing around with any programming, I know how to create a virtualenv and I won’t (further) irrevocably borf (still a very technical term) my machine!!
FINAL Update: WOW! What a terrific exercise. Many hiccoughs along the road, but now, at the end, I have learned so so much. For example, now I can tell you what Heroku really does – it’s something that will take in and run your program, but is separate from actual domain/web hosting. Though the tutorial does host it on heroku, it’s obviously intended for your own site, ha ha! Also, I’m now totally comfortable with virtualenv, which is a really crucial step for me. There’s more, but I’ll reserve it for a future update! Thank you for reading this megapost!
Depending on how much control over git you need, the github client from their site is fantastic. I use it for work pretty much every day, and makes a lot more intuitive sense to me.
Git falls in that category of things that are hard seemingly just to be hard, to me 😛
yeah, I mean, I’ve never used it beecause I also find the web interface to be totally sufficient. there’s only been one instance (ha!) in which I’ve needed to do something that I couldn’t on the web interface, and the windows git program worked just fine to fix a, b, & c. but I recognize that it COULD be useful, ha ha!
Ah, we push updates all the time, since usually there’s 3 of us working on the same project and it’s the easiest way to quickly show each other something. It has a fairly nice command line shell thing too if that ends up being needed.
So it’s ridiculous how easy virtualenv is. Last time I went to do this, I must not have been able to sit down for the literally 5 MINUTES it took to understand how to use it. I no longer feel the shame I had back when I wasn’t employing its simplifying powers. (Though I still don’t want admit to this under my real name) Thanks for the inspiration.