Posts tagged ruby on rails
Move-ember
Not to be confused with Movember which is infinitely cooler (because it involves mustaches) than Move-ember which sucks (because it doesn’t involve mustaches.)
I can report that we have successfully moved me from my apartment in Westchester to Brooklyn. From the second Friday of November until now, I’ve been scrambling to gather my earthly possessions and migrate. I was tired, sick (for the second and third time this season) and overwhelmed by the shear amount of crap I have collected over the past two years. Our new apartment is considerably smaller than my old one in Westchester and will eventually not only house my crap but Adam’s crap as well. I think I will have to get inventive with where I hide store things.
This also meant that NaNoWriMo was also ruined yet again for me this year. I did reach my goal of writing more words than last year but that was not a difficult feat considering how pathetic last year’s entry was. On the advice of a friend, I’ll probably attempt a DecNoWriMo but who knows how that will go considering the amount of birthdays and holidays that sprinkle across the month.
In other news, while not crumbling into a million pieces from the exhaustion from moving, I managed to roll out Redmine 1.0.3 to my users at work with only minimal casualties. While Redmine is an alright task tracking tool, it is a beast and because it is open-source, it’s kind of terrible to upgrade from an old version to a recent version. Our PostgreSQL database had metamorphosed into an harry, horrible monster and I had to do a lot of inventive SQL queries and drop tables to get it to be more manageable.
Now the winter holidays are upon us. Hanukkah is a lot earlier than I anticipated, plus birthdays, and a trip to Pittsburgh for Christmas. I hope I can at least have a relaxing and fun New Year’s!
Lightning Talks Posted to SlideShare
I took some time today and posted two of the lightning talks I did for the online team here at work. They probably don’t mean much to you unless you were actually at the presentation though.
ActiveResource, Cucumber and Dupe
At my job at American Express Publishing in New York City, I’m doing Ruby on Rails development and I was hired to help with the redesign of FoodAndWine.com. The production site is currently running Cold Fusion and MS SQL and the team is employed with the task of creating a Service Oriented Architecture (SOA) Ruby on Rails web site to replace the legacy code. How this works is that the legacy Cold Fusion site will serve up services for our site, we’ll make requests to get that information and then display that on our Ruby on Rails front end.
This is all nice and dandy because of Ruby on Rail’s ActiveResource that’s built right in. The tricky part comes in with testing. At American Express Publishing in our web development department, we’re really big into Test Driven Development (TDD) and Behavioral Driven Development (BDD). There are tools out there already made to do TDD and BDD for Ruby on Rails, Rspec and Cucumber, respectively. These tools work great when using ActiveRecord but since we don’t utilize a database, Rspec and Cucumber have a hard time working with ActiveResource and mocking service data.
This is where Dupe comes in. My co-worker Matt Parker came up with a ruby gem to mock service calls for use within Cucumber and Rspec so that we can write the appropriate tests for our code. With Dupe, you can write expected service returns and run tests against them. For the initial pages we’ve written we’ve only needed GET requests. When I started cuking and spec’ing some of the flat pages on Food and Wine we found that there was a (probably underused) polls section of the site that we needed to pull over. Because it needs user input to add to the poll, we would need to add a way for Dupe to mock POST requests.
This is the first time I’ve really programmed a gem let alone worked on someone else’s. I’ve spent a lot of time today researching HTTP requests and GETs, POSTs, PUTs and DELETEs. I also looked up the difference between blocks, lambdas and procs and found this neat, well-written blog post about them that helped straighten me out.
I’m still figuring out the appropriate way to set all this up but hopefully I can update the blog with a success story by tomorrow!
My Snow Leopard Upgrade
This has been a pain in the ass for the past 2 weeks for me. At work I do a combination of iPhone objective-C programming and Ruby on Rails programming. Just about everything broke and I’ve been pulling my hair out and patching things with scotch tape just to get it into some kind of working shape. I haven’t had to time to back everything up and just reformat the damn machine and install everything compiled properly to the 64-bit system but here are some links that have helped me wobble along until I can fix things.
The Xcode muckiness wasn’t as bitchy to overcome by just fiddling with some of the settings to get it to work with my company’s code – but the problem also was that the new Xcode that ships with Snow Leopard totally got rid of all the previous iPhone SDKs I had. My company still runs most of our iPhone apps off of 2.2.1 and Xcode for Snow Leopard only does 3.0. Unlike my co-worker who practice more forethought than I do (so what, call me ignorant), I didn’t have a backup of the previous Xcode stashed somewhere else. Adam showed me a tricky trick in the new Xcode and you are able to still use the new 3.0 SDK but set the deployment target to whatever the heck you want.
OF COURSE, with the new iPhone 3.1 SDK, they’ve included all the previous iPhone SDKs to work with the new Xcode 3.2, thus eliminating my rage, but a little too late for the heartburn I was experiencing earlier this week.
Now, getting ruby on rails and our projects running on my laptop has been a bitch and a half and I’m still pulling teeth just to get things working locally. I was being a tool and just deploying all of my test code to the integration server to test for the past week and a half just so I could get some actual work done before Labor Day. I’m sure my co-workers didn’t appreciate that. :-p
Getting PostgreSQL working with ROR and installing the proper gem. I used to use pg but that was not working. I’m instead using postgres-pr and that seems to get mongrel up and working on my local environment. Make sure to change your ARCHFLAGS to ‘-arch x86_64′ if you originally had it set to i386.
http://railsforum.com/viewtopic.php?id=34110
I had to totally uninstall things like my MacPorts and rubygems and postgres and install everything from scratch again. I also had problems with my paths and I was constantly pulling up the wrong version (i.e. Snow Leopard’s version) of ruby and postgres.
Originally I had thought that just by recompiling everything the Ruby on Rails guys suggested, I’d be golden. But that just didn’t work out for me.
I think I am just going to reformat everything this weekend and follow this guy’s advice. What a mess!
Oh well, rant over. Hopefully I can post about a more successful Snow Leopard install next week.
Making the Blogenning Easier (Maybe?)
I’ve been promising this for a while but with regular life and headaches taking over my free time… I have been less than productive. But fear not! I DO have an update. I think I basically have the first version of the “Blogenning” software I’ve been talking so much about right now.
For the time being it will be hosted at http://blogenning.rachelober.com/. Not to be self-serving, but it is easiest for me to update it. I spoke with Brandon and we both thought that if it worked well enough we could each chip in a buck and buy ourselves a proper domain to house the insanity.
Features:
- User login and administration
- Add “rounds”, “entries” for rounds, and “users” for entries
- Main page lists the rounds starting from most recent to oldest entries
On the to do list:
- Registering and password retrieval
- “Special” statuses for “trend setters” and “bastards” (these are inside-jokes for people NOT in the Blogenning)
- API stuff so that a plugin for WordPress and Drupal can add rounds and entries
- User account stuff so you guys can change your password
Also, if you know ruby on rails or want to get in on designing the beast (I refuse to do any complicated CSS for this at this point *looks at Jaco and hopes his artistic sense may help with this one*)… you can join our GitHub site and ask to be put on the development team so you can have some input. Yay!
For the time being only my entries are entered into the database so you’re going to have to add your own damn entries because I’m much too lazy to do everyone’s.
Once I get password retrieval working on the site, I have all of your user accounts made, so then you can just do a password retrieval and your password will be emailed to you.
