Imapenguin Logo Banner Layout

Archive for the ‘Ruby’ Category

Upgrading to rails 2.2

Saturday, November 22nd, 2008

We’re busy testing our apps on rails 2.2 now that it’s out.

Things are going very well. We’re here to help you with yours if you need us, send an email to support@imapenguin.com

We’re switching to passenger

Wednesday, August 27th, 2008

Mongrel has served us well for the past year or so, but the simplicity of deployment in passenger along with the ever reliable apache has lured us into extensive testing. We’re getting slightly better performance numbers from passenger over mongrel with about 2/3 of the memory footprint. Please let us know at support@imapenguin.com if you see any wonkyness with any of our services. As we migrate over night.

Ubuntu Ruby Vulnerabilities Officially Patched

Friday, June 27th, 2008

ubuntu logo

Ubuntu pushed patches for the aforementioned Ruby vulnerabilities last night. apt-get to get them in a snap. Thanks for the quick response Ubuntu team!

Nate’s How-To Update Ubuntu Servers to Close Ruby Vulnerabilities

Thursday, June 26th, 2008

ubuntu logo

Nate Clark is right. The risk of the recently announced Ruby vulnerabilities may or may not be high, but let’s not take any chances.

He’s done a quick and good how to on upgrading Ubuntu servers. Check it out. Nate Rules.

Ruby Vulnerabilities

Monday, June 23rd, 2008

Ruby logo

Bleh, there are some nasty ruby vulnerabilities out in the wild right now. Details are here. We’ll post an update as Linux distributions get patches to let you know who needs to take action to get fixes.

We’re compiling ruby from source for the time being on production machines until updates appear.

If you need help, it’s support@imapenguin.com

Capistrano Git Deploy Issue

Thursday, May 29th, 2008

There is a bug in the capistrano git bridge that’s not been patched in the stable version yet.

If you’re getting:

fatal: Could not parse object

A quick and dirty hack is to add a task that just removes your git cache for now on the deployed server with:

desc "Clear that git cache"
task :clear_git_cache do
  run "rm -Rf /#{deploy_base}/#{application}/shared/cached-copy"
end

before "deploy", "clear_git_cache"

It takes about 1 second longer to do the checkout but I don’t really notice.

Capistrano 2.0 and Mongrel Recipies

Tuesday, November 27th, 2007

Capistrano 2.0 doesn’t work with those mongrel recipes we all have nowadays. We scratched our head at some hacks before finding a good solution via the blog world.

Thanks to Megablaix, Inc for posting this code. Works great for us, just tack it onto the end of your deploy.rb and go:

namespace :deploy do
  namespace :mongrel do
    [ :stop, :start, :restart ].each do |t|
      desc "#{t.to_s.capitalize} the mongrel appserver"
      task t, :roles => :app do
        #invoke_command checks the use_sudo
        #variable to determine how to run
        # the mongrel_rails command
        invoke_command "mongrel_rails cluster::#{t.to_s} -C #{mongrel_conf}", :via => run_method
      end
    end
  end

  desc "Custom restart task for mongrel cluster"
  task :restart, :roles => :app, :except =>
       { :no_release => true } do
    deploy.mongrel.restart
  end

  desc "Custom start task for mongrel cluster"
  task :start, :roles => :app do
    deploy.mongrel.start
  end

  desc "Custom stop task for mongrel cluster"
  task :stop, :roles => :app do
    deploy.mongrel.stop
  end
end

]]>

Ruby makes me smile

Friday, July 6th, 2007

It’s not often that computer work makes me smile. I needed to download 6 files today. This is what made me smile:

[1,2,3,4,5,6].each do |number|
    system("wget http://mirror.stanford.edu/yum/\
        pub/centos/5.0/isos/i386/\
        CentOS-5.0-i386-bin-#{number}of6.iso")
end

Ahh. Ruby, where the simple things are simple.

]]>

Ruby and Erlang process bridge

Thursday, May 10th, 2007

Erlang is a really great language for problem areas where a distributed system is involved, but it lacks the huge number of libraries that Ruby has. Wanna have your cake and eat it too? Yep, so do we. Enter
Erlectricity, a Ruby to Erlang bridge.

It’s already on rubyforge, install it with:

sudo gem install erlectricity

We’re actively prototyping a software solution that would be better in Erlang as it needs to be massively concurrent (think deep packet inspection at 750Mbits). Two libraries we need for aggregation exist in Ruby but not Erlang. Now we can bridge the two and let Erlang do it’s thing and Ruby do what it does best, just not so fast.

]]>

Imapenguin Ruby on Rails Appliance

Thursday, April 26th, 2007

Yes, we know the Rails appliance is still on rails 1.1.6 :-)

We’re developing an automated build system for incremental rails updates on the appliance and including MySQL support in May.

If you need it quicker, this is a 100% open source project. We don’t charge for it and wont, so let us know if you’re interested in joining the development team.

]]>