- Nested examples and progressive setup are a trade off between DRY and readability
- Matt Brictson on Lightning-Fast Sass Reloading in Rails 3.2. How to get CodeKit like reloads with your rails project. This little task is amazing, and will greatly speed stylistic chages.
- Bryan Helmkamp on 7 …
API with Padrino and Grape November 2nd 2014
Recently, I have been exploring options for creating RESTful APIs in the Ruby. Concurrently, I have been investigating Sinatra and its father-framework padrino to create a lighter weight web app. While Sinatra in itself is a suitable solution for APIs, grape is a micro-framework specifically geared towards creating …
Ubuntu 14.04 and Compiling Ruby 2.X April 26th 2014
While trying to set up a VPS running Ubuntu 14.04 I was unable to compile Ruby 2.1.1 (which was the current version). I kept running into errors such as:
readline.c:1977:26: error: ‘Function’ undeclared ...
The cause is that Ubuntu 14.04 ships with Readline version 6.3 which apparently breaks builds of Ruby and Python. …
Guard and Unresolved specs January 26th 2014
While using bundle exec guard
I was recieving the following types of warnings:
15:30:07 - INFO - Running all specs
WARN: Unresolved specs during Gem::Specification.reset:
ffi (>= 0.5.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
bundle update
did not resolve this problem. …
Rails 4, Turbolinks, and jQuery November 10th 2013
If you have a Rails 4 project with malfunctioning jQuery the culprit is likely a new feature in Rails 4 called turbolinks. Turbolinks attempts to speed response times by not reloading the header (in fact the whole page) each time a new request is made. Instead, the body of the page is replaced using ajax and json. The …
Rails 4 and Twitter Bootstrap 3 October 30th 2013
If you are starting from scratch on a new rails project you may want to start with what is current, which at the moment is Rails 4 and Bootstrap 3. I would suggest setting up RVM or rbenv before continuing.
Install Rails 4:
gem install rails
Ensure you have it:
$ rails -v
Rails 4.0.0
Create your new project with rails: …
Strong Parameters in Rails 3 October 6th 2013
For the uninitiated, Strong Parameters is a gem for white-listing attributes that can be mass assigned. This is a replacement for the Rails method of white-listing that ships in 3.x. It also ships standard in Rails 4, so it behooves you to be familiar with it. Herein, I will discuss a few lessons in switch an existing …
Rspec Notes September 14th 2013
Referencing a bug report in an example via pending
describe "functionality" do
it "should do something" do
pending("bug report #78") do
xyz.function()
end
end
end
What is nice here is that …
Guard and Capybara's save_and_open_page August 14th 2013
I noticed a problem while running Guard where it would appear to malfunction and become unresponsive. The tests would still run or at least complete (according to growl), but I wouldn’t see errors and the guard prompt would never return. I wasn’t sure quite why this was happening. Here’s a sample of …
Useful Rails blog posts August 14th 2013
A list of specific blog posts (not written by me) that I believe are helpful for a Rails developer:
Development
Ruby: Classes, Modules, and Mixins July 27th 2013
Below is a short review of classes and modules. This post is written so I can cement these concepts for myself. The source material is Metaprogramming Ruby and is mainly a rephrasing of concepts from it. If you would like to understand more, I recommend the book.
Objects
Starting for the bottom, the most basic unit is, …