🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

A little under the hood and a complete noob questi

Published November 07, 2006
Advertisement
Okay, doing a little minor work under the hood here. First off, my purchasers are having a problem downloading games. It's really a usability thing. My little download machine used to look like this. . .


1. Choose your game to download [combobox]

2. enter your name [entry field]

3. enter the magical unlock code emailed to you [entry field]

4. enter your download format (radio buttons, zip or exe)

("download now" button)


Problem is, I get loads of failed downloads, and they're all coming from people entering the wrong game in the combobox (number one above). Usually they get it right around the third time, but probably half of my buyers make a mistake trying to download a game.

So I thought to myself, why wasn't I a smart person from the get-go and embed the game's name into the magical code, thus saving the user a step? Unfortunately, that'd break downloads for the existing game owners, so I had to come up with a better solution.

So from now on I'm going to pre-pend the part number to the game's unlock code, and I rearranged the download process like this. So, instead of getting a download code like this. . .

Your username: fredrick fribble
Your code: ewr2f9iweq9if9013ir

You now get.

Your username: fredrick fribble
Your code: BD1-ewr2f9iweq9if9013ir

(and no, that's not a valid code)

If you enter those two values as your name and code, the "game to download" combobox automagically sets itself to the proper game (in this case, Bulldozer for Windows).

If you enter an "old" code without the part number, it'll still work just fine. You'll just have to choose the game to download manually.

Hopefully this'll cut down on failed downloads from now on.



I also need to revisit google checkout. It's working, but not quite properly. Google's got a weird sequence of calls it makes to your code, and I'm still not responding to 'em correctly. The upshot is, I'm sending a user 2-3 "here's your magic code" emails, and I have to charge their card manually. I'll have to dig a little deeper and make sure I'm doing things properly.



Finally my noob question. What does Rails (aka Ruby on Rails) compile to? Glancing at the Rails page, it appears that my web server must only "support CGI" for Rails apps to run, (unlike PHP that requires the PHP binaries exist on the server-side). CGI, however, is not a programming language. CGI is a specification for I/O between a web client and server. I can write a CGI in perl or C or anything else that supports stdio, so just saying "it outputs a CGI" doesn't tell me much.

If I wanna run Rails code, do I need to add some kind of gizmo to my web server (ala PHP), or is it something I can just compile and upload, and if so how?

Looking at the FAQ, it appears that Rails has an in-line compiler (again ala PHP), but it's optional. That's neither here nor there, but I wanted to make it clear that the Rails folks seem to be saying that any kind of extension server-side is optional.
0 likes 1 comments

Comments

MauMan
I think what they're saying is ruby can by configured like any other language for CGI.

Ruby is an interpreted language so at the bare minimum you need to have Ruby installed on the server like you would with perl or python. Also you need whatever libraries/frameworks/etc... installed. Last you have to configure the CGI mechanism for whatever webserver you're running to know to run ruby for a particular extension like you do for perl, python, csh, etc... or in unix/linux you #!/<whereever ruby is> on the first line of your cgi script.

Then you're done!
November 08, 2006 01:12 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement