Apr 7 2009

My Perfect Rails Development Environment in Windows

The Problem

I normally do most of my Rails development in Linux, but I do have a Windows development environment setup as well, because most of my non-development time is spent in Windows and I like being able to quickly work on a Rails project without having to switch to my Linux machine.

The problem though with Rails development on Windows is two-fold:

  1. Ruby and Rails do not cooperate with Windows as well as they should sometimes
  2. Microsoft doesn’t cooperate with UNIX well at all

So rather than try and lay blame as to who’s fault this is, I’ve developed a workaround work flow that works quite nicely.

Software I Use

To make Rails development easier in Windows, I use:

  • The E – TextEditor
  • Cygwin (installed at first by e, but customized later on by me)
  • puttycyg (because Windows console windows suck)

Installing the Environment

I recommend removing Ruby for Windows (the one-click installer variety) before you get started.  It will make things a lot easier for you down the road, and unless you’re doing Ruby for Windows applications development, you won’t need it.  I also recommend uninstalling Cygwin as well if you have installed it previously, because the e will automatically setup Cygwin for you with some pretty good defaults.

Download a trial of the E – TextEditor and install it.  When you first run it, it will want to install Cygwin.  Let it do so.  Pick Manual if you want to customize the software.  You can choose Automatic though and be just  fine, because you can always rerun the Cygwin setup (by going to the Cygwin website and downloading their installer) and add or update features later.  If you choose the manual method, it would be a good idea to include Subversion, Git, and perhaps other languages like Python and a C compiler to enable you to use other UNIX software inside your Cygwin installation.

Once you’ve done this, you’re almost ready to go.  If you like the Windows console, then you can stop here – but I don’t.  That’s where puttycyg comes in.   It’s basically a modified PuTTY version that works with Cygwin.  Using this program you can connect to your Cygwin instance, but having all the options of display and scrollback that come with PuTTY.  Let’s face it, being limited to 2 fonts in the Windows console really isn’t fun.  I’m still amazed Microsoft hasn’t fixed this.

Once you’ve done this, you can pretty much proceed with development of Rails application using the same commands you would on a Linux or Mac machine (well, at least with 99% compatibility).  You can even access your Windows drives with the /cygdrive/c (replace c with the drive you want to use) path in Cygwin.

Conclusion

While this isn’t the most ideal setup, it works well for most things, and enables you to use Capistrano deployments much more easily than you can in Windows.  Git’s native Windows version has a long way to go, and thus the Cygwin near-native UNIX version of Git makes using Git under Windows a far more productive task.

In this guide I’m using the E – TextEditor.  You could replace this with any other editor that you like and achieve similiar results.  You can even use Vim or Emacs inside Cygwin.  Either way, I still recommend using Cygwin, because the native Windows Ruby interpreter and Rails support for Windows will cause you problems down the road.


Feb 28 2009

RAM Upgraded on Shared Hosting Plans

Effective March 1st, 2009, we are upgrading our shared hosting plans to include more RAM.  This really applies only to customers who use Ruby on Rails, Django, or another long-running user-created process.  This extra RAM will make more room for your application and give you more breathing room to avoid running over on your plan.

Many have asked our policy on RAM usage and how we enforce the limits.  All of the RAM limits on shared hosting are soft, with a high hard limit to prevent a runaway process with a memory leak to cause problems for other accounts.  If your Rails application goes over your limit by 5 or 10% we do not typically mind.  Since we don’t oversell, the limits are there to help keep resources free for all users on shared hosting plans.  If you start to use too much RAM over the buffer zone we allow for all accounts, we will notify you with options on how to proceed.

These new limits will take effect both on new and existing accounts.


Feb 2 2009

Alert: New cPanel Phishing Scheme

Recently we received an e-mail from a concerned customer that was claiming that their cPanel account needed validation, instructing them to click a link and provide login credentials.  The e-mail appeared to come from a bogus address and fortunately the link didn’t work, instead providing a 404 error page.

We are passing this along to our customers and all cPanel users in general though so that they can be aware of this and avoid this sort of scam.  OCS staff would never e-mail you and ask for information in this way.

If you are an OCS customer and receive an e-mail asking for login details that you’re not sure about, please contact us securely.  If you’re not an OCS customer, please contact your hosting company or cPanel for details.


Dec 19 2008

OCS Website Improvements

I’m delighted to announce some significant improvements that we have made on the OCS website, particularly in regards to navigation.  The top navigation single layer menu has been replaced with a drop-down menu to aid in faster navigation.  In addition, the bottom of the site now has a mini-navigation area so you can quickly move to other pages of interest.

We have added a new page on our managed hosting service.  Back by popular demand, this service frees you from the headaches of server management and lets you focus on your business.  We have also introduced a managed shared hosting plan which provides support above the standard level of already comprehensive support offered by our shared hosting service.

We are in the process with working out promotions with 3rd party vendors that we’ll be able to offer you for free or at a reduced cost.  I’ll be providing more details on that in our next post.

If you haven’t yet signed up for our low-volume mailing list, please take a moment to do so.  Each e-mail will be loaded with information you can use, including tips and tricks on how to get the most out of your website.


Nov 20 2008

Improved OCS Support Wiki Layout

We have improved the layout of our OCS Support Wiki, particularly on the front page.  Information is better categorized and more easily visible.    We have also removed some redundant and conflicting information in articles and updated some of them to reflect recent improvements.

We are always adding new information and articles to our wiki, so check back often for the latest updates.


Nov 8 2008

New Blog, New Direction

Many of our customers have asked where they can get the latest news and updates on OCS products and services, as well as opinions from our staff.  Our forums usually served as this outlet, but unfortunately, there has been no cohesive place for this.

This new blog is an attempt to change that.  We’ll be posting here on a regular basis, sometimes daily.  You’ll hear mainly from me, but also from the rest of our staff, sharing news that affects both OCS customers and thoughts and ideas on current Internet technology topics of interest.

Our old posts have been archived and can be found at the old OCS Solutions Blog, but we will phase them out eventually.

Please feel free to comment on any post you see here and share your thoughs with us as well.  We love hearing from you!