According to Cordell

Guard and Unresolved specs

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. gem …

Rails 4, Turbolinks, and jQuery

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

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

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 …

Book Review: The Rspec Book

Reading The Rspec book is a lot like testing itself. A bit of a chore, but in the end you hopefully are better off for it. Additionally, the book covers much more than Rspec, and focuses greatly on behavior-driven development and Cucumber. Finally it is straight from the horse’s mouth, as many of the authors …

Rspec Notes

Nested examples and progressive setup are a trade off between DRY and readability 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 when the bug is fixed it …

Passwords: a Primer

You may have heard that you should use a random password to protect yourself. Or that you should use a different password on all your different online accounts. Or that you should use some r@nd0m characters in your password. This article serves as a short primer on passwords and why they are more and more of a problem. …

Book Review: Eloquent Ruby

Eloquent Ruby By: Russ Olsen Eloquent Ruby is an essential read for any aspiring or current ruby programmer. I think it serves particularly well as as an “intro” text to Ruby for those who have other programming experience and/or Ruby experience. Personally, I am often bored by intro texts, and lose intrest …

Guard and Capybara's save_and_open_page

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 …

Using MAMP and Pow in harmony

I wanted to use Pow to serve my rails apps during development. However, Pow takes over all port 80 requests. This means that if you are also using MAMP (or any web server) for local development, those sites are inaccessible. I don’t want to run MAMP on a different port, so what to do? First, uninstall Pow, …

Pages