In a recent twitch stream, Gary Bernhardt showed a bit of behind-the-scenes in how he prepares his development environment for recording a screencast. One of the tools he showed in passing was gem_home by Hal Brodigan. gem_home is a simple script that manipulates Ruby’s GEM_HOME and GEM_PATH environmental variables in order to keep separate ruby gem locations. By using gem_home, there is no longer a requirement to prefix all ruby commands with bundle exec.
As a remote worker in a rural community, I’ve found it difficult to find other technology workers in the area. After speaking with Brett, we decided to start the Norfolk Techies Slack group. If you’re a technology worker in the Norfolk County area please contact Brett or myself for an invitation link.
Today I needed to prove that my Rails controller method deleted a cookie. After Googling for the answer (without success), I came up with the following. Within your controller: cookies.delete('cookie-to-delete') In your controller spec you can check that the cookie was deleted with: expect(response.cookies).to include('cookie-to-delete' => nil) Rails sets the cookies to be deleted to a value of nil. By checking for the presence of both the cookie name with a value of nil, you can ensure your controller code deleted the cookie.
Brett would be so proud of me. Over the past couple of days I’ve been learning C# and ASP. C# has that Visual Basic tinged Java feel to it, while ASP seems unlike anything else I’ve worked with before. While I’m not a big fan of Java, I think I might be able to tolerate working with C# and ASP. Brett has talked about us doing some Windows application, so these technologies should make that part easier than coding with either MFC (shudder) or the raw Win32API.
I looked into Ruby on Rails a few weeks ago after seeing it discussed on Slashdot and Perl Monks. There are some interesting ideas in Ruby on Rails, so I thought it would be a good idea to explore Ruby itself. It feels very much like Perl, as members of Perl Monks have mentioned in other posts there. To get my head around Ruby I looked at the free online book, Programming Ruby.