Archive › Ruby

Building Better APIs in Ruby (and Rails)

I recently presented a lightning talk at Austin on Rails titled “5 ways to build better APIs in Ruby”. Below is the slide deck, along with a coupon code to our book to help with your API design and development. 5 Ways to Build Better Web APIs with Ruby and Rails from LaunchAny   Get […]

Comments Off on Building Better APIs in Ruby (and Rails)

MySQL Bulk Insert Performance With JRuby and JDBC

I often have need to perform a bulk import of CSV files into MySQL for different projects. Recently, I made the move to the JRuby platform for one of my projects and have benefited from some great performance improvements for the types of work the code needs to perform. I decided that it was time […]

Comments ( 2 )

Why I Selected JRuby For My Ruby Project

For those working on the Ruby platform, this is an interesting time. We have Ruby 1.9 YARV, Rubinius, and JRuby as the most popular Ruby Virtual Machines available right now. Each one has its strengths and weaknesses, which have been documented already. While each benchmark comparison may show a particular VM better than another, there is another assessment that needs to be made when selecting the target VM for your next Ruby project: best fit for what your project needs to do.

Comments ( 6 )

37signals on Rails Optimizations

There is a great post at the 37signals blog about how they optimized Basecamp using New Relic. One thing I found most interesting: MySQL optimizations: We’ve been working with a MySQL performance consultant to help us optimize our database calls and queries. We’re still early in the process but we’ve learned a lot so far. […]

Comments Off on 37signals on Rails Optimizations

Raising Exceptions within Your Rails Application

Clemens Kofler has a great post about when to raise exceptions within your Rails application: Over the years I’ve come up with a little rule of thumb for exceptions: Libraries Should Raise, Applications Should Not Raise. Yes, it’s as simple as that. To understand the reasons for my rule of thumb, we have to switch […]

Comments Off on Raising Exceptions within Your Rails Application

Ruby Microframework Footprints

I’ve been looking for a microframework for Ruby that is simple like Camping but supports RESTful resources like Rails. A tip from the Denver Rails UG pointed me to Sinatra via Adam @ Heroku’s Blog: Sinatra apps are typically written in a single file. It starts up and shuts down nearly instantaneously. It doesn’t use […]

Comments Off on Ruby Microframework Footprints

Subdomains and Rails

I was trying to setup the proper environment settings in Rails 2 to support cross-subdomain cookie sharing (so the user doesn’t have to login again if they manage multiple subdomain accounts). I was experiencing some inconsistencies when trying to make sure it was working. Here is a tip: Clear your cookies (the Firefox Web Developer […]

Comments Off on Subdomains and Rails

Make RESTful Authentication XHR-aware

I’ve been working on a project that uses a little XHR mixed into the app to update DIVs on a page. The problem with the RESTful Authentication plugin is that it will always send a redirect back to the browser if the user is no longer logged in, but the XHR callback will simply try […]

Comments ( 1 )

Label References and RESTful Authentication in Rails 2

I’m working on a new project that is using the RESTful Authentication generator with Rails 2. As I started to take advantage of the label references capability in Rails 2, I ran into some problems. The default fixtures provided by RESTful Authentication look like this: quentin: id: 1 login: quentin email: salt: 7e3041ebc2fc05a40c60028e2c4901a81035d3cd crypted_password: […]

Comments Off on Label References and RESTful Authentication in Rails 2

Austin-American Statesman on Rails

I hear some founders say that one technology is the same as another when launching a startup. Scott Abel, chief executive of Austin-based software company Spiceworks Inc, says differently: Choosing correctly was key, Abel said. “You pick the right one, and everybody wants to be on your team; the cool, super-smart people flock to you. […]

Comments Off on Austin-American Statesman on Rails