Posts by Kevin Runde
So in my last Blog post I mentioned I converted the mongrel_cluster Capistrano recipes to the new Capistrano 2.1 format. Since then a new version of mongrel_cluster came out (1.0.3). I read the read me and sure enough they had just done the same. Well sort of. I was eager to see how my conversion compared to theirs so I went looking for their newrecipe_2.rb file. Problem is it didn’t exist! They forgot to included it in the new gem. So I entered a bug and also offered advice how they could make the mongrel_cluster recipe file auto detect Capistrano 2.x. In case anyone is interested click here to see the bug entry.
Filed in: Team Member Blog
So this weekend I started a new sample application for Rails. I decided I was going to use the most recent version of all the tools, such as Rails 1.2.5 and Capistrano 2.1. I how they upgraded Capistrano. First all of my 1.x tasks still worked, even with out going through the upgrade process.
Then there is a great upgrade guide on the Capistrano Website. It is very short because upgrading is very straight forward.
BUT
I was getting warning from the mongrel_cluster tasks. So I decided to dive into Capistrano Task definitions. I was surprised by how easy they are to understand. I was expecting something like Ant or worse Maven, but the DSL created for Capistrano is so easy to work with I was able to do learn it and convert all of the mongrel_cluster tasks to Capistrano 2 in just a few hours. There was one very confusing and tricky part. When you have a task in one name space calling a task in a different name space you do it by using dot instead of colon. Thats right if you wanted to call mongrel_cluster:start from your deploy:start task you would add a line that says mongrel_cluster.start. I just don’t like that syntax. Every where else you use the colon.
Filed in: Team Member Blog
So far I have talked about the different technologies I am using and getting them setup. Now I want to start talking about the plug-ins I am find useful. Recently I have started to use Acts as Authenticated and SSL Requirement. First if you are looking at the different authentication / authorization plug-ins I strongly recommend looking at Acts as Authenticated. <a title=“Here is a great source of information.”
href=“http://technoweenie.stikipad.com/plugins/show/Acts+as+Authenticated”>Here is a great source of information. The plug-in just gives you basic features. The URL I listed before has lot of modiications to the plug-in to add features like emails authentication, forgot my password, remember me, and many other features. Many even include additional tests.
The next plug-in I have been using is SSL Requirement. This is a great plug-in. It just works! In your controllers you just tell it what actions require SSL and which ones don’t. It handles it from there. I have run into 1 problem, but that appears to be a bug in rails integration test system. Flash messages get lost when doing rails integration tests and switching between http / https. This does not happen in a production environment. I have to check and see if this is a known bug.
Filed in: Team Member Blog
So in my last post I talked about getting my web stack setup. I have Apache 2.2 using Mod Proxy Balancer talking to a Mongrel Cluster with MySQL as the database. I copied over one of my test apps and everything is working fine. Now I wanted the ability to deploy to production from any where with an internet connection. Since I do all this on my spare time sometimes I am coding over my lunch hour from a restaurant.
Thus I read up on Capistrano. Okay let me just say Capistrano ROCKS!!! I can’t believe how great of a deploy tool this is.
This was so easy to do. First I read this Shortcut (its on Safari) : Mongrel
I used that shortcut to make sure I had Mongrel setup and running right.
Next I went online and found lots of different ways to setup Capistrano. Then I stumbled across this shortcut (Again it’s also on Safari): Capistrano.
This worked great. This shortcut talks specifically about setting up Capistrano with small steps that help you prove it is working and what would probably be going wrong. I hit a few issues and this shortcut has all the answers. Also Capistrano was originally created when everyone was using FastCGI. This shortcut leads you down the road of using Apache and Mongrel which is what I am using so again this was perfect.
So I took my test app I have been making and with in a day I read the Capistrano Shortcut and got my app deploying. The next day I went to a local restaurant and pushed out an update over my lunch hour! AWESOME!
So I have started working on the another app at home. Part of the reason for the delay in my posts. Well Over my lunch hour I took that app, applied all the Capistrano Configs, Setup the Production Environment and Databases, and finally deployed the application all in my lunch hour. I have NEVER setup a production environment that fast before.
RAILS ROCKS!!
Filed in: Team Member Blog general
Welcome my second rambling about using Ruby on Rails!
I have MySQL configured correctly now. It was very easy to do with the MySQL GUI Admin tool. Unfortunately the tool it’s self isn’t very stable. It would lock up a lot when viewing users. I’m afraid I may have to uninstall the Ubuntu install packages version and install it my self. Like I’ve had to do with Apache, Subversion, and RubyGems.
What’s that you say? Yes I did just say I had to manually install Apache and Subversion. It turns out Ubuntu only has Apache 2.0 available and not Apache 2.1 or 2.2. I’ve seen many posts about people complaining about it, but no sign from the Debian or Ubuntu people that they will do anything about it. So I had to go install it my self. OH this also broke SVN because I used Apache to access Subversion so then I had to download my own Subversion and build it my self. Turns out that was for the best too because again the Ubuntu version was 1.3 and the latest SVN is 1.4. So Ubuntu / Debian is on my naughty list right now. Still it is much easier to work with than any of the other distros so I would use it over any other Linux. Of course right now I am starting thing about buying a Mac Mini just to run as a server. ;-) If only Apple did cost so much. I just can justify spending that much on hardware when I can build a better box for less.
Luckily I found this one blog that has to articles on this. THIS talks about installing Apache 2.2. THIS talks about taking that Apache 2.2 and installing Subversion. I did have to do a few things different though. I use SSL so when I configured Apache I also had to do —enable-ssl. Also when I built Subversion I had to make sure I had the Development Files for Neon which I did use the Ubuntu Software Management tool to get. If you don’t do that then Subversion cannot access a repository over http or https. David Winter thank you for the two awesome articles and you are my new hero.
So why did I need Apache 2.2. Good question. After I got MySQL configured I tried to setup Mongrel Clusters. That was simple and easy thanks to RubyGems and the quality of Mongrel and Mongrel Cluster. Then I tried to load balance my Mongrel Cluster behind Apache. The suggested way to do that is use Mod Proxy Balancer, but that requries Apache 2.1 or Apache 2.2 and NOT Apache 2.0. Thus I spent another weekend to find this out and then going through manually building Apache 2.2 and Subversion.
Now though I can tell you all I have an awesome server stack. Apache using Mod Proxy Balancer talking to Mongrel Clusters. Why is this so cool. Well now I will automate my build using Capistrano.
I’ll save that for next time. ;-)
Filed in: Team Member Blog
I am Kevin Runde and this is my first post. I joined QWANtify last year and am loving it here. I was blogging for a little bit on LiveJournal about my experiences using Ruby on Rails. This blog is going to continue those adventures.
So here is what I have been upto with Rails and Ruby lately. I have started working on some apps with friends and ran into common issues. I needed a Subversion repository, Test Server, Continuous Integration, etc. I was looking at getting a Virtual Server at some places like Rails Machine, but I had some computers sitting around at home and couldn’t justify spending the money for a Virtual Server. So I have setup a machine at home!
I took an old 1 GHz AMD with 512 MB and put Linux on it. I first tried Fedora Core 6. That didn’t go well. First I had to download 5 disk images and burn them, after I already did the DVD image and realized the old computer didn’t have a DVD drive. Then it wouldn’t install. The best I can tell is that my NVidia card caused issues. So one weekend shot. Next I tried Gentoo. That installed, but wouldn’t update correctly. Another weekend shot. Then I installed Ubuntu. It worked and had lots of documentation about how to make my NVidia card work too.
So now I have Ubuntu and started getting all of the services on it I needed. I first got Subversion installed and had that working via SSH. I didn’t like the SVN+SSH solution with Windows. It sucked so I installed Apache and signed my own certificate so now I have Subversion working over https and NOT http. AWESOME!!!
This past weekend I decided it was time to install Rails. There I hit a weird issue. Ruby Gems in not an installable package!! Why? Because the Debian developers have issues with a ruby package manger when they have their own package manager. I am getting really sick of Linux developers deciding to not support something because they don’t like it. This is one of the biggest issues with Linux. Alright I’ll get off my SOAP BOX for now. So I got Ruby Installed. Built Gems and installed in manually. Then I used Ruby Gem to install the rest of rails as it should be done. Last night I installed MySQL and started setting it up. I love how by default the security is very tight. PLUS you get good error codes you can look up to figure out how to adjust the security.
After I have MySQL configure correctly. I will get some of my apps running. Then I plan to start using Mongrel Clusters and Deploy Capistrano.
I’ll let you know how that goes!
Filed in: Team Member Blog