Category Archives: ruby

Running cucumber features with sunspot_rails

We wanted to integrate the sunspot_rails gem into our cucumber features. I found a ticket where mat adviced to call Sunspot::Rails::Server.start / stop in one of the available cucumber hooks. Code found in features/support/env.rb is run when Cucumber begins and exits so this seemed the right place to start Solr: Sunspot::Rails::Server.new.start   at_exit do Sunspot::Rails::Server.new.stop end Also, make sure you’ve [...]
Posted in ruby | 1 Comment

Using transactions with Ruby DataMapper

With DataMapper, it can be quite a challenge to perform tasks that seem so simple at first. DataMapper is an object-relational mapper (ORM) written in Ruby, with a lot of great features and innovative approaches to common ORM-tasks. But it lacks documentation for some of the less-used features and even the more popular search engines [...]
Posted in ruby | 1 Comment

How to setup Ruby on Rails, Apache and Passenger on Debian Linux

For this article I’m going to install a single (virtual) server to run a standard Ruby on Rails application. I will be using Apache2 and passenger for the webserver stack and MySQL as a database server. Let’s start by installing Ruby and all tools: # apt-get install build-essential # apt-get install ruby irb ri rdoc libopenssl-ruby ruby1.8-dev # [...]
Posted in ruby | Tagged , , , , , | 1 Comment

Ruby and SSL Certificate Validation

If your ruby app is doing SSL, you have probably seen one of the following errors: doc = Hpricot(open("https://www.cert.org/blogs/vuls/rss.xml")) # => /usr/lib/ruby/1.8/net/http.rb:590:in `connect': certificate verify failed (OpenSSL::SSL::SSLError) or warning: peer certificate won't be verified in this SSL session The solution is to make sure ruby has access to the right set of root certificates.
Posted in ruby | Tagged , , | 1 Comment

Giving Love To the Community

Earlier this month Kabisa attended the Ruby en Rails 2009 conference in Amsterdam. Ruby en Rails is the largest dedicated Ruby and Rails conference in the Netherlands. For the first time in its history Ruby en Rails was a multiple day event. The first day, October 31, was packed with interesting presentations on various Ruby and [...]
Posted in ruby | Tagged , , , , | Leave a comment