Subversion

(not going to finish) Production web serving with Cygwin - PHP, Ruby on Rails & ColdFusion

Tags: 

Note: I'm not going to finish this article as ultimately I ran into problems with Cygwin so migrated to running all Windows-native tasks. Still, in its raw state someone might find some use out of it.

Web development is an interesting field. Many of the technologies you try or wish to use work best with a specific requirement, for example despite attempts to the contrary ASP simply works best on Windows with IIS. Another example of this notion that has become rather common of late is that Ruby on Rails and its related tools really work best on UNIX-like operating systems and doesn't work as well on Windows.

For those "stuck" with Windows for their production web serving there is, however, a work-around called Cygwin, a UNIX compatiblity layer for Windows that has been around since the mid 90's so is very mature and well supported. Cygwin provides the best of both the UNIX world with a robust platform for running many UNIX-only tools, while still providing the Windows foundation which is often needed for e.g. proprietary database drivers. Read on as a give a full list of what you need to install, and how to configure, all of the tools necessary for a pretty comprehensive web development production environment.

Installing Cygwin

The first step is to obtain the Cygwin installer executable from cygwin.com. Run the cygwin.exe program when you download it and you'll see something like the following:
Following through the prompts you'll want to first "Install from Internet" to download all of the required files and install them immediately. On the next screen you'll pick where to install Cygwin, whether to install it for all users or just yourself and whether to make data files use the UNIX or DOS/Windows format - I only ever change the directory path and leave the others at the defaults; the next screen asks where you want to keep the downloaded files, I recommend a sub-directory of where you're installing the main Cygwin system, just to keep them close at hand. The next two screens will ask for your network settings (most people can leave the defaults) and then to pick the Cygwin server to obtain all of the files from - I suggest going through the list and trying some to see how fast they are before picking a favorite.

The next screen is where all the fun is - you get to pick what software to install. I recommend clicking the "View" button to make the list change to a plain list of all of the available software, and maximizing the window, as it can be confusing to work out what category certain apps are in.
Here are the packages we are going to need, besides the basics:

  • apache2
  • gcc
  • gcc-g++
  • gnupg
  • ImageMagick
  • nano
  • curl
  • mhash
  • openssh
  • ruby
  • subversion
  • unzip
  • wget
  • whois
  • make
  • openssl-devel
  • ping
  • bison
  • flex
  • libmcrypt
  • libmcrypt-devel

SSH:
ssh-host-config -y
Give a password
ntsec tty

FreeImage:
make -f Makefile.cygwin
make -f Makefile.cygwin install

PHP
Apache
Ruby on Rails

ruby installed via cygwin
download rubygems
ruby setup.rb
extras:
gem install --remote --include-dependencies rails
gem install --remote --include-dependencies mongrel
gem install --remote --include-dependencies mongrel_cluster
gem install --remote --include-dependencies capistrano
gem install --remote --include-dependencies image_science
gem install --remote --include-dependencies hpricot

GCC
Subversion
FreeImage
ColdFusion
MySQL
SQL Server

http://brantinteractive.com/index.php/?p=47

dmckenna@websrv /home/dmckenna/ruby-dbi
$ mkdir /lib/ruby/site_ruby/1.8/DBD

dmckenna@websrv /home/dmckenna/ruby-dbi
$ mkdir /lib/ruby/site_ruby/1.8/DBD/ADO

dmckenna@websrv /home/dmckenna/ruby-dbi
$ cp lib/dbd/ADO.rb /lib/ruby/site_ruby/1.8/DBD/ADO

http://substantiality.net/articles/2006/10/19/mssqlclient-gem-now-available

Redmine - excellent RoR-based project management tool

Tags: 

I've just been converted to a tool called Redmine, a combination of the ubiquitous Trac and something like ActiveCollab. Able to work directly with Subversion code repositories, Redmine gives you support for multiple projects, per-project tasks, content management (blog, news, document management, wiki), both a calendar and GANTT chart to view progress, a very comprehensive user management system that can even authenticate against LDAP (i.e. Active Directory, NetWare, et al), and as always is an open-source application so you can improve/extend the code as you see fit. I'm trying it out at work but it looks like something I'm going to start using for all of my project management. Awesome stuff!

Subversion's one problem

Tags: 

I've used the document revision management system Subversion for a few years now and find it to be an excellent tool that has never given me any problems. Until this week, that is. I was helping to set it up on a web server that has Fedora Core 4 as its OS - we wanted to have a central code repository for the various projects we worked on and it was a logical step to place it there. Well, I started searching around for an installer for the latest Subversion release (v1.4.2) that was compatible with FC4 only to discover that there wasn't one! It seems that during the v1.4 development cycle they updated one of their code's dependencies (libapr) to a newer version than is compatible with FC4, you need to have FC5 or newer to be able to install it without any hickups. So, rather than asking the server's service provider to upgrade to a newer OS I'm going to see if there's a way to hack the code to make it install with the older version - wish me luck!

Pages

Subscribe to Subversion