The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
How to manage file uploads with Backbone.js, paperclip, jquery file upload and...
This week’s in Crowd Interactive’s tech blog: [more inside]
Decoding Rails Session Cookies
I wrote about how easy it is to decode and view the contents of session cookies in Rails 3. A fully encrypted cookie store is coming in Rails 4.
chruby 0.3.3 released!
chruby 0.3.3 has been released! This release contains bug fixes and workarounds for using tmux with chruby/auto.sh, ohmyzsh’s bundle exec ruby alias and OSX Mountain Lion’s PROMPT_COMMAND. Version 0.3.3 should be available via homebrew shortly.
The somewhat peculiar behavior of Ruby's Thread#raise
When you call Thread#raise, the exception will be raised at whatever point of execution that thread happens to be at. In my blog post, The somewhat peculiar behavior of Ruby’s Thread#raise, I explore why that does make sense, but why it means you should only ever call Thread#raise if you have complete control over what code is inside that Thread and if it expects exception raises to be invoked by the outer context.
Testing a live JSON API with ruby and RSpec
Since I never found a short, concise way to test my APIs from the outside (e.g. monitor running instances), via HTTP, I created this little gem: rspec_api_test. Testing one URL per line.
Automatic Gemfile security audit for all your organizaition/user repos
bundler-organization_audit audits all your projects for vulnerable gem version. Pro tip: Run it on your CI!
Setting ActiveRecord's connection pool size on Heroku with Puma and Sidekiq
How does one change the connection pool size in Rails when hosting on Heroku? Watsi’s post on setting AR’s connection pool size uses the latest and greatest from both Puma and Sidekiq to achieve this.
Representable 1.3.3 Released With User Options Support!
Representable 1.3.3 got :setter and :getter to define accessors inline and process user options from outside! Heads-up here.
Call for papers is open!
Barcelona Ruby Conference call for papers is now open! You have time until March the 10th to submit your proposal - don’t miss the chance.
Time based OTP token for Google Authenticator in Ruby
I just wrote a blog post on creating time based otp token for Google Authenticator in Ruby Let me know what you think.
Custom pre-commit hooks with pre-commit gem
pre-commit comes with checks like missing-migrations/merge-conflicts/whitespace/jshint/… and now can also run project-specific checks via config/pre-commit.rb
I used RubyMine 5.0 for a week, here's what I thought
I’m a Vim user. Just give me an editor and get out of my way. But there’s always been something nagging me, it feels like I’m living in the past. So I decided to take the plunge and used RubyMine 5.0 for a week.
Search Amazon in Ruby
After having a difficult time finding an easy-to-use gem for searching Amazon products, I ended up writing my own gem from scratch. It provides a simple Ruby DSL for searching, looking up products, and retrieving “browse nodes” (i.e.: categories). You can find the gem named a2z on Github.
FFI: Foreign Function Interfaces for Fun & Industry
An FFI wrapper is much easier to write and maintain than a C extension, more portable across platforms and languages, and easier for users to install. Here’s when and how to use one.
Yet another Ruby shootout (round 2)
Yet another Ruby shootout (round 2): [more inside]
What you did not know about Capistrano, yet
Capistrano is probably the oldest but still the most popular Rails deployment tool around. While there is some documentation around, I often end up browsing through the source code. Almost every time I discover things I did not know before. Today, I published a blog post about some great Capistrano features you probably did not know, yet.
Railsview: Ruby on Rails Theme Marketplace
I just launched RailsView a ruby on rails theme marketplace. Railsview has its own gem: You can buy or download themes and add a vest to your app in a few seconds with our gem “xkimo”. You don’t have to worry about converting your path: Railsview sells themes for Rails App. (with the right routes, and right path to your assets pipeline) Full HTML/JS/CSS themes and CSS based themes: With Railsview you can also build CSS based themes. All the Css based theme will be FREE. It’s FREE: It’s completely FREE to join and Railsview is taking 0% cut on our sellers sales until the end of our BETA. Sellers will keep 100% of each sales!
Everyday Rails Testing with RSpec now covers Capybara 2.0 and more
I just released a major update to Everyday Rails Testing with RSpec, my intro book on testing heretofore untested Rails applications. Of note, the update now covers the Capybara 2.0 DSL and RSpec’s preferred expect() syntax. I also rewrote the chapters on model specs and factories. [more inside]
Haml 4.0 released
Haml 4.0 has been released. The new version includes SCSS, Less and Coffeescript filters; better HTML5 support; hyphenated data attributes; security, performance, and thread-safety fixes; and more.
Github Contributors - gem to update static files with contributor list.
I just released Github Contributors gem for easy updating static files with list of Github project contributors list. [more inside]
Ruby Thread#kill and ensure blocks
It turns out ensure blocks are executed inside a Thread even after the Thread is killed. I write about it and show an example here.
Using SSL in your local Rails environment
New post in my blog: Using SSL in your local Rails environment.
Rails Assistant on the Mac App Store
I just launched Rails Assistant on the Mac App Store. It’s a developer tool for Ruby on Rails.
Copying server data from the command-line, safely
I released a command-line tool for One-Time Secret today which is handy for copying sensitive data to and from your servers.
$ gem install onetime
Code Reuse in Ruby -- It's complicated
This 13 page PDF summarizes what I’ve learned about the differences between behavior sharing and implementation sharing techniques (i.e. composition vs. inhertance). Hope it’s useful to you!