Cruisecontrolrb, git and rails 2.1

Posted by mjwall on August 18, 2008

I really love cruisecontrol.rb in a team environment.  The ability to run tests against every commit is great, and it is such fun being the “build police”.

Excuse me sir, can I see your license to commit please?

We can have some fun with that one.

This license expired just before the dotcom bubble

You have a languague restriction here that says you can commit only while wearing vb.net

I need to see some proof of build collision insurance.

But I digress. Sorry, back to the program.

As rails grows, I have some questions.

  1. Where the heck is code for cruise control?
  2. Can I use git?
  3. Will it run against rails 2.1 since I am security conscience and have updated after the recent warnings and threats?

Let’s do some research.  The code used to be at rubyforge. Looks like the code is still there. However, according to this post, they are moving to github. The link in that post has an extra *, but sure enough, you can find cruisecontrol.rb at http://github.com/thoughtworks/cruisecontrol.rb. Cool, now I know where to get it.

What about git support?  A google search, turns up benburkert’s github branch. Looks promising. Searching git hub for cruisecontrol.rb shows several forks, but these are all from rubyforge git.  I want it straight from thoughtworks.  Digging a little in the code shows it is already in the thoughtworks master.  There is even a mercurial adapter.  Let’s give it a try. Sure enough, it works just fine with

cruise add projectname -r file:///home/me/src/gitproject -s git

Run

cruise help add

for all the options.

Great, 2 for 2.  Now what about support for Rails 2.1?  Unfortunately, it is not there. Cruisecontrol.rb currently runs with rails 1.2.3, and a simple version change in environment.rb doesn’t fix it. (Didn’t figure it would but I had to try it right?)  For all of us who have updated to ruby 1.8.7, we are stuck for now. Ruby 1.8.7 only runs rails 2.1. My last post about multiple version of ruby doesn’t really help either.

I did find this post answered by the team about porting cruisecontrol to merb. That sounds interesting indeed.

Until then, who is working on a rails 2.1 version of cruisecontrol.rb?

Moving to Wordpress

Posted by mjwall on July 30, 2008

Alright, I give. Rails on shared hosting really sucks. I’ve seen reports of success with Phusion Passenger, but my host doesn’t support it yet. I wrote about my some of this issues I have had. So welcome to wordpress. Same theme, mostly, with less crashes. Maybe this will encourage me to write more.

Rails Shared Hosting and a little Merb 2

Posted by mjwall on March 05, 2008

It has taken me almost 2 months to put this post together, but at the time, DHH’s article on shared hosting support for Rail was very timely. I use shared hosting to run this blog and have had some headaches. This is another great post on the subject. Lots, and I mean lots, of interesting comments. Part of those 2 months was getting through those comments.

So what can we do? Rubinius / mod_rubinus seem really interesting. Long term, this may be a great solution. More immediately, I am intrigued by Rack. Rack is just a webserver abstraction and would not solve the lack of threading in Rails though. But there is a Rack adapter built into Merb, which is thread safe. I will be spending some time looking into Merb and I’ll document my investigation here.

So what headaches have I had with shared hosting. Only a few, because this site doesn’t get much traffic. Here are some details about my setup (warning, here comes an ad). I have the “Small” plan from asmallorange (ASO). The price is very reasonable and the features are good: SSH access, Rails support, unlimited mail accounts, unlimited mysql databases, unlimited subdomains and many other features. Support has been great, they have installed every gem I have asked for within minutes without a hard time, even Camping but that is a story for another time. ASO also has a reseller plan so you can sell off part of your hosting and make a little money. Ok, back to the post.

So what problems have I had with shared hosting? Like most shared hosts ASO uses FastCGI to support Rails. Mongrel is too expensive in a shared hosting environment. My problems have been with FastCGI and limits ASO has in place. They allow 5 instances of FastCGI to run concurrently. Again, no problem with the amount of traffic I get. However, idle instances die after 4 minutes. So at some point, all my instances die and the next request has to startup FastCGI and then serve the page. It can take 2 minutes, which is too long. There are some reaper and spinner scripts in Rails, but I don’t have enough permissions on my server to run them.

Another problem I had came from wanting to mimic my production environment as closely as possible on my laptop. I tried in vain to install Apache with FastCGI. Yes, it is windows and I was using Cygwin, but after 2 weeks of off and on install and configuration failures, I gave up.

If FastCGI is running, I have had no complaints with performance. You can judge that for yourself. I don’t fault ASO either. The restrictions they place on FastCGI make sense for their business model. Shared hosting for Rails is hard, and I think they have done a good job accommodating the community so far. I would recommend them if you want to support for multiple languages, if you are looking for really inexpensive hosting, and if you understand what you are getting into. Certainly they are good as Dreamhost
All the other Rails apps I work on are run with mongrel clusters. Currently, I think that is best option for production sites with a decent or even large amounts of traffic. I’ll be interested to see if Ezra recommends anything else in his new book

Vim and Rails

Posted by mjwall on January 17, 2008

I do almost all my development using vim/gvim. Vim is great. Yes, I have tried IDEs, and will use Eclipse when doing some java work. Ever since I started developing in Rails though, it has been me and vim.

I see lots of posts with rails code. Many of them are from Textmate, a Mac text editor, and the VibrantInk color scheme looks great. I already use rails.vim which is a great plugin by Tim Pope for rails development. He has also released a color scheme based on VibrantInk called vividchalk. There is another VibrantInk port for vim oddly enough called vibrantink.vim. Both are really good, but I use the vibrantink.vim color scheme getter for couple of reasons. One, it looks better in console vim. Two, the italics in vividchalk through me off.

Here is a screenshot from flicker with a comparison of the 3 made by Jo Vermeulen, the guy who made vibrantink.vim

New site

Posted by mjwall on December 30, 2007

Well, nothing like waiting until the last minute. My personal weblog has been down for over a year. One of my 2007 new year resolutions was get it back up. Here goes.

Over the past year or so, I have been doing mostly Ruby on Rails work, both personally and professionally. I had to find another job about 3 months ago, and I was dreading having to go back to Java. RoR is just so much fun. I wanted to set my new weblog with RoR and looked at both Typo and Mephisto as well as few others. Why did I choose Typo? I think it was after listening to Stuart Halloway’s podcast. So far so good. I have to say, I am surprised by how easy it was to get set up and going. Much different than my experience with drupal 6 years ago. Surely I know more now, but I am still surprised. I’ll post more info about the set in the about page

I plan to blog mostly about technology, things I find interesting and things I learn. Maybe someone will find it useful.

Thanks for stopping by.