Stunslinger.com Blog

February 22, 2007

Updating Rails

Filed under: Computers — Stunslinger @ 8:39 pm

Ok, so I just had two days of headache because of Ruby on Rails. First of all, I must say that I actually really like programming in RoR and I think it’s a wonderful development in web programming. I’m barely into my first book of RoR (Agile Web Development with Rails, 2nd Ed.) and I already have a mostly functional shopping cart application with AJAX even! The book is wonderful, probably the best one out there for learning RoR (although I did read several chapters in the Pickaxe book on Ruby syntax which was very helpful for learning Ruby on Rails).

So my first problem was that the syntax in the book wasn’t generating the view it was supposed to. After searching around Google for a long time I finally realized that it was because I had an old version of rails installed (1.1.6 instead of 1.2.2) and the syntax was different in the old version. So I changed the syntax to the old version to make sure it would work, then set out to update rails. This turned out to be easy once I found the right command “gem update rails –include-dependencies”. Ok great. I type “rails -v” in the console and it tells me I have 1.2.2 installed. Excellent. So I fire up my WEBrick server and look at my application with the newer version syntax and … nothing. WHAT!?!

So finally I find out that the application is still running on rails 1.1.6. I have no idea why this is or how to fix it at this point. So another frantic Google search ensues. Several hours pass and I have no idea what to do so I go to bed. This morning I finally came across a reference to updating rails and then updating the individual apps, as they run on the rails version they were first created with. So this evening after work I finally figured out what to do. I had to open up environment.rb (located in my app’s directory\config) and change the line that says RAILS_GEM_VERSION to reflect my new version. Save. Re-run WEBrick and presto! It works.

Wow. I’m writing this in part to express my frustration, but also in case someone else is having this problem. Maybe their Google search will lead them to this page and that will be of some help.

Tags: , , , ,

February 20, 2007

The Good (future) Doctor

Filed under: Psychology — Stunslinger @ 5:01 pm

So for those of you who don’t know the process, in order to complete my doctorate I have to complete a dissertation.  This process involves researching a topic (Pro Bono Therapy for mine), writing up a review of the literature, proposing the study formally to a committee, doing the research, writing up the paper and then “defending” my research as a finale.  Well, a week ago I successfully defended my dissertation!  I still have some steps left, and I have to finish my remaining 6 months of internship, but it’s a major hurdle and it’s done.

All that to lead up to this: my parent’s friends sent me a congratulations card and a gift.  They sent me a “Dr. Grip” pen along with a card addressed to Dr. Stunslinger.  I thought that was awesome.  Just thought I’d share.

Tags: , ,

Ant Poison and Superpowers

Filed under: Thoughts, Information — Stunslinger @ 4:53 pm

This weekend I was in the fight of my life against an invading army of sugar ants.  Somehow, they penetrated my outer defenses (the walls) and were running amok in my house.  Ok, mainly they were aimlessly wandering around my bathroom floor, but still…  So I read online about blending confectioner’s sugar and Borax to make an ant poison.  This apparently is more of a Trojan horse poison in that it doesn’t kill the ants immediately.  Instead, they carry it back to their nest and share it with the other ants before dying.  Sounded pleasant.  So I mixed together some Borax and table sugar, and laid it out in a buffet line for the ants.  Later I wondered if this Trojan horse poison really would work, so I went to Home Depot to pick up some commercial ant baits that are supposed to do exactly the same thing.

As I walked into Home Depot, I walked up to their ridiculously oversized sliding glass doors and willed them open with my mind.  I even did a little opening motion with my hand, subtly at my side so nobody would notice that I did it and think I’m weird.  This is not the only time I have done this, nor will it be the last.  I like to escape into my little imaginary world, if just for a moment, where I have superpowers and can control physical objects with my mind.

When I was younger, I had these same sorts of daydreams.  Except back then I actually spent time thinking up ways that I could actually do these miraculous feats without invoking the supernatural.  I imagined that I would discover some underlying force, similar to a gravitational force, which could be controlled and would, in turn, control objects in the world.  Sometimes I imagined that this force could even rearrange the molecular structure of objects, changing a baseball bat into a block of cheese (for a random example).  Other times I could solidify air, control fire, or clean the dishes with no effort.

It’s obvious that I borrowed heavily from Star Wars with the idea of the force, but it’s still interesting to me that I had to make up a scientific reason why it would be possible.  What kind of kid uses scientific reasoning in his daydreams?  Well, obviously that would be me.  It’s amazing what memories one little action like this can bring up.  For the record, I’ll continue to open doors with my mind.  Nothing you can say about sensors and motors will shake my conviction that I open the door with my mind.  This is especially applicable when the doors don’t open and somebody walks into them (they didn’t use their mind) or when the doors do that jerky “am I opening or closing?” deal (competing mental orders, or someone who is still learning to harness the power of their mind).

Oh, and the ant baits don’t seem to be working very well.  I realized yesterday afternoon that I incorrectly followed the recipe (”mixing” instead of “blending” and using table sugar instead of confectioners), so I think I’ll retry that this evening.

The Ant Poison Recipe:

  • 1/4 c. confectioner’s sugar
  • 1 tbsp. Borax

Blend together and place near ant trail.  [Remember not to use Borax around pets]

Tags: ,

Powered by WordPress