Mostrar / Ocultar Avisos

Archive for June, 2007

The Simple Development Life

I recently installed a new hard drive on my development PC and thought it would be a good time to refresh my environment since it was suffering from Windows rot. Man, was that experience an eye opener as to the tools I use. Here is my alphabetized list.

I had to install more things like mail clients, printers, etc. as well. I just found it amazing at the number of tools I have to use in my professional life

Trying to Install Ruby Gems On Windows Though a Proxy Server

As with most larger businesses we have a corporate firewall which can lead to small annoyances, such as not being able to connect to rubyforge.org to download new gems. I recently had a new hard drive installed at work so, of course, I had to spend too much time reinstalling all of my development tools. Visual Studio 2005 takes way too long, btw.

Yesterday, I spent a good hour trying to get Rails with the standard gem install rails –include-dependencies. No luck due to our firewall. So I checked the ruby gems doc to find the correct install parameters. Still no luck. No matter which combination I tried to tell gem to look remotely through the proxy server it still wouldn’t go. So I asked the Google to help out and after reading through blog entries and message boards I stumbled upon one that talked about setting environment variables in linux. Well, I’m a windows guy so that didn’t help much but it gave me the idea to try and set a Windows environment variable. What the hell, right?

So, I added a User Variable for my account called http_proxy with the value of http://<proxyserveraddress>:8080, rebooted, ran plan old vanillia gem install rails –include-dependencies, and magically, it worked. See below the fold for details.

Read the rest of this entry »

Rails Rake Task for Resetting Your Database

The code below was given to me by Jonathan Viney when we worked on a Rails project together last summer and I’ve found it very useful. It is a rake task that will drop your developement dB and restore it based on your migrations and test fixtures. And as a good Rails developer I’m assuming you are using both.

Ugh.  I really need to find the bug killing my formatting in the SyntaxHighlighter.

How to Return a Generic .Net DataSet from the OpenEdge AppServer

Recently at work we needed a good, and easy, way to get data stored in our massive ERP system running an OpenEdge database to some of our .Net apps. At first, we just had ASP.Net connect directly to the database through ODBC which was good enough for our prototype. However, if we were to continue using this method it would require our Microsoft developers to learn a totally new and convoluted schema. Plus, they would have to use embedded SQL statements like…

** dbBroker and GetDataTableBySQL are part of our in-house framework but you can get the idea.

Embedded SQL is a code maintenance nightmare in my opinion. I’ve never liked mixing languages like this. Fortunately, OpenEdge comes with a better way call the Open Client Toolkit (sorry, no link). To quote the product literature the Open Client Toolkit is used “to generate .NET, Java, and Web services proxies for accessing business logic.” In our case we used it to create DLLs which we can reference in our Visual Studio projects.

[I will post another article on the specifics of using ProxyGen from the Open Client Toolkit to create .Net DLLs]

This process works much better as our MS developers can just make a call to the methods in the DLLs (I’ll write about this is another article) and not have to worry about the ERP’s crazy schema while our Progress developers can actually create real business logic procedures to aggregate data. The only problem with this scenario is that every time we want to add to the AppServer code we must regenerate the DLLs and make the .Net apps reference them properly. Talk about a pain in the ass.

Here is how we I solved this problem. Read the rest of this entry »