-
Rails and Microsoft Sql Server
So you want to connect your rails application to Microsoft SQL Server. The following instructions will take you through setting this up quite simply. This setup is on a a Ubuntu 8.04 server connecting to SQL Server 2000 (we will use the Northwind sample database). The first thing you need to do is install the following gems:
$ gem install dbi --version 0.4.0 $ gem install dbd-odbc --version 0.2.4 $ gem install rails-sqlserver-2000-2005-adapter -s http://gems.github.comMore info can be found on the sqlserver adapter gem development page. This is just the first step. Read the rest of this entry »
-
Removing the hiberfil.sys
By default Windows Vista and Server 2008 have a hibernation file equal to the size of the amount of memory you are using. Of you have 12GB of RAM, that will be a 12GB hiberfil.sys. If you are using a small SSD, that would be a killer waste. Removing this file is a quick way to free up HD space, although considering how cheap drives are, you could always upgrade. Furthermore if you are using a virtual machine, you probably don’t need this space wasted either.
Now I do not know why they do this on the Server version since who hibernates a server (that being said I am sure some people probably do, silly tree huggers). The real bugger with this problem is that shutting off hibernation does not always remove the hiberfil.sys file. Alternatively, what if you want to remove it without needing to reboot the server. I found a very fast and simple way to do this is to launch a command prompt as an administrator and run the following command:
Read the rest of this entry » -
Rails Application and SSL Problem in Internet Explorer
Recently we ran across a very annoying problem when deploying a Ruby on Rails application running under SSL when viewed in IE7. When we loaded the page in Internet Explorer 7 there was a content security error. This made no sense at all as everything was secure, and even when we hard coded absolute links the problem still persisted. What could possibly be causing this problem.
Thinking perhaps it was some random HTTP link sitting in the code, the developers went over everything with a fine tooth comb and could not find the problem. Knowing that a secure content error could be the result of a number of things we broke parts out of the page and rebuilt the page one line at a time until we recreated the content error. Low and behold we found a single JS file that was causing this problem!
Read the rest of this entry » -
New Amazon EC2 Reserved Instances
The good folks at Amazon have announced a new pricing scheme called a Reserved Instance to complement the On Demand instance. For a low one time payment, and about 20% of the instance hour cost, you can reserve capacity on 1 or 3 year terms. If you want to tie yourself into a long term contract but have a significantly reduced rate resulting in savings, this is the option for you.
For a standard instance, on a per use basis you will pay approximately $880 for one year. Using the new reserved instance, you will pay about $580 for a savings of around $300. These are just rough estimates, but a reserved instance saves you around 30-50% versus On Demand instances. The longer the term, the better your savings. You will save $1300 on a 3 year term deal against an on demand instance running for 3 years straight.
Read the rest of this entry » -
Rails and the iPhone
With the growing Rails and iPhone communities, many developers seek ways to easily interact with their Rails applications on their iPhones. Enter ObjectiveResource, a framework for interacting with Rails on your iPhone. Go to iphoneonrails.com to learn more.
ObjectiveResource is an Objective-C port of Ruby on Rails’ ActiveResource. It provides a way to serialize objects to and from Rails’ standard RESTful web-services (via XML or JSON) and handles much of the complexity involved with invoking web-services of any language from the iPhone.