-
Archives
- November 2019
- February 2018
- April 2017
- October 2015
- July 2015
- May 2015
- January 2015
- August 2014
- November 2013
- September 2013
- August 2013
- July 2013
- June 2013
- March 2013
- February 2013
- November 2012
- October 2012
- August 2012
- July 2012
- November 2011
- September 2011
- August 2011
- May 2011
- January 2011
- October 2010
- May 2010
- April 2010
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
-
Meta
Category Archives: Ruby
Private methods in Ruby
I think the way private methods are defined, is one of Ruby’s few weaknesses. The main problem being that they separate the private methods from the methods that use them. For example, I prefer this: def one internal_method(1) end … Continue reading
Posted in Ruby
Comments Off on Private methods in Ruby
Downgrading the ElasticSearch version in SemaphoreCI
In our current project, we are using Elasticsearch for rapid search (it is the best search engine I’ve used to date), and are using Semaphore CIĀ for continuous integration (Semaphore is new to me, but so far it looks very good). … Continue reading
Posted in Ruby
Tagged elasticsearch, semaphore
Comments Off on Downgrading the ElasticSearch version in SemaphoreCI
The How, When and Why of Ruby
One common question asked when people start using Ruby, is which books should I read. For me there are three essential Ruby books. However, I don’t think anyone should just read all three at once, and certainly not if they … Continue reading
Posted in Ruby
2 Comments
In praise of the super user: The problem with the admin/user paradigm
I am coming to the end of my longest ruby contract so far – building web applications for Warwickshire County Council. It’s been a wonderfully productive couple of years, and I’ve gained a lot from working with the team at … Continue reading
Using Jasmine with Rails 4.1
I had a few problem getting fixtures to work within a Jasmine environment. I was getting the error “ReferenceError: loadFixtures is not defined” The fixture was an html pages at spec/javascripts/fixtures/form.html, and this was my initial test code: describe("Rollback prompt", … Continue reading
Posted in JavaScript, Ruby
Comments Off on Using Jasmine with Rails 4.1
The lows and highs of SAML
I’ve been working on a number of OAUTH based authentication systems recently as part of the work I’m doing for Warwickshire County Council on the Alpha Identify project. This has led me to also look at SAML. I’ve been building … Continue reading
Using Exceptions to help separate functionality
I have recently had to split a class into two and found raising exceptions via a new error class was key to the success of this process. I’ve been working on Geminabox. The goal was to add the facility for … Continue reading
Posted in Ruby
Comments Off on Using Exceptions to help separate functionality
Intercepting Ruby exceptions
The way some Ruby applications catch exceptions makes it more difficult to debug the underlying issue. That is because a common pattern for handling an exception is this: begin do_something_that_fails rescue SomeError raise MyAppError.new "Something went wrong" end … Continue reading
Functional tests with Carrierwave
Carrierwave is a really nice gem to use when you want to upload and save a file within a ruby object. But how do you test it, if you don’t use anything more that test/unit or minitest? Most of the … Continue reading
Posted in Ruby
Comments Off on Functional tests with Carrierwave
Adding a console shell to your ruby apps
Using Rails Engines is a really nice way to introduce yourself to creating gems. It provides an environment to create and test code that is very similar to that used when creating a full rails app. There are couple of … Continue reading
Posted in Ruby
Comments Off on Adding a console shell to your ruby apps