Essential Sublime Text 2 Plugins and Extensions | Nettuts+


I switched from TextMate to Sublime Text 2. Been using it for months now and it keeps surprising me with how fast, smooth of an experience it is. If you are still using TextMate or something else, you need to look at this post. Essential Sublime Text 2 Plugins and Extensions | Nettuts+.…
Read more ⟶

Do your own Agile…


There’s a lot of buzz going on about software development methodologies, people talking about Agile, Kanban, Pair, XP and more and more. There’s not much people are talking about when it comes to a single developer. I have been a consultant/developer for the past ~3 years or so, working from home for several clients both in Israel and abroad (US mainly). During this time I gained tons of experience in knowing what works and what doesn’t, this may be specific to me, but I don’t think so, so I decided to share this knowledge.…
Read more ⟶

Better simple_format for Rails 3.X projects


Since Rails 3.0 came out, we Rails devs deal with the auto escaping of HTML. Now, in most cases it comes in SUPER handy, but not always. Rails has an answer to that, it’s called ‘simple_format’, and it escapes the HTML and formats the string to be friendly, with line breaks, etc… Now, the problem with simple_format is that it wraps everything with a paragraph tag, which doens’t always fit your design, your markup or just your sense of aesthetics.…
Read more ⟶

Setup your laptop for Ruby and Rails development


Setting up a new machine has never been an easy task, I remember back in the days where I was a windows user, setting up a new machine was a real pain in the ass. I used to write everything I had installed on a piece of paper and then go one by one and install everything, if I needed to download it could take even days to get a new machine up to speed.…
Read more ⟶

Kill all resque workers with a single command


At Gogobot we are running background processes with Resque. We are using God to start workers on all servers, both front end and back end (with different queues). God sometimes has an issue with leaving some stale workers laying around which cache old code, so if you change your code, this is your enemy since you start seeing failed jobs that should not fail what so ever. Even when you stop the rakes (Workers run by rake) with god, it will still leave those lying around.…
Read more ⟶

Re-Queue failed jobs with Resque


I have been working with resque for about 1-2 months now, while migrating an application from rails 2 to rails 3, I have switched from Delayed Jobs almost completely. Sometimes, your workers / jobs fail and you need to re-queue them. The trick is to requeue the job and remove it from the failed stats, this way, if it will fail again, the next time you re-queue the job will not be executed twice.…
Read more ⟶

Rails uninitialized constant Resque::Server


One of the most significant changes in my migration of a rails app from Rails 2.3.10 to rails 3.0.9 was the move from delayed_jobsto resque. Resque is a Queue system that’s based on Redis, which is much faster and reduces the load on your database. Also we were experiencing some nasty deadlocks with delayed jobs that really broke our transactions and our backs. I installed the gem and installed Redis on my development machine, mounted the Sinatraapp on my rails app and navigated to the web view of resque.…
Read more ⟶

Use specific version of RubyGems per project with RVM


If you’re following this blog (and of course you should), you know by now that I have been upgrading a bug project to rails 3. One of the things that I needed to do was to upgrade RubyGems. Since I did not make the switch completely (production still on rails 2.3.10), I’m fixing p0 bugs on the old project and merging the changes. One problem I encountered is that rails 2.…
Read more ⟶

Mount a Sinatra app on your Ruby on rails (3) application


I have been migrating a Rails 2.3.10 application to Rails 3.0.9, while doing so I also migrated our queue system from delayed_jobsthat ripped our system apart to Resque. Resque comes with a Sintra app to monitor the Queue, see what’s going on and what jobs failed etc. It’s very convenient and you can really grasp what’s going on with your system. I really missed that in delayed_job (amongst other things).…
Read more ⟶

Uninitialized constant Syck::Syck (NameError)


It’s old news for you devoted reader, but as you know I love coding with Ruby on Railsand that’s what my story for today is all about. I just spent about an hour scratching my head and throwing my keyboard (don’t tell Jobs) around my home office on this issue. I am upgrading an existing project (guess which…) from rails2 and ruby1.8.7 to rails3 and ruby 1.9.2. First thing is of course installing bundler and working with the Gemfile (thank god).…
Read more ⟶