github.com

ProgressBar is a simple Ruby library for displaying progress of long-running tasks on the console. It is intended to...

If Sunspot does not work and fails with a backtrace similar to this: /project/shared/bundle/ruby/1.8/gems/rsolr-1.0.6/lib/rsolr/client.rb:227:in `adapt_response' /project/shared/bundle/ruby/1.8/gems/rsolr-1.0.6/lib/rsolr/client.rb:164...

If you defined your association via class Article belongs_to "category" end and you try Article.scoped(:include => :category)

makandra dev

Saying git diff only shows unstaged changes relative to the index (or HEAD if the index is empty, alternatively any...

The following snippet demonstrates how you could create excel files (with spreadsheet gem) and format columns so that they follow...

makandra dev

This describes all the steps you'll need to get Solr up and running for your project using the Sunspot...

Views are normally (for good reason) not rendered in controller specs. If you need it to happen, use:

github.com

Gem to get Ruby 1.9 features in Ruby 1.8.

github.com

Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.

Sometimes you want one distinct version of RubyGems to be installed to replicate the same behavior across multiple servers.

makandra dev

This note summarizes the ruby exception hierarchy. Exception NoMemoryError ScriptError LoadError NotImplementedError SyntaxError SignalException Interrupt Timeout::Error # < ruby 1.9.2 StandardError...

Using .downcase or .upcase on strings containing umlauts does not work as expected in Ruby versions before 2.4. It leaves...

When selecting records in a date range, take care not to do it like this: start_date = Date.parse('2007-05...

Although it's tempting flirt with detecting mobile/touch devices with CSS media queries or Javascript feature detection alone, this approach...

The tagged_with scope comes with many awesome options to modify your search: User.tagged_with("awesome", "cool") # Users that are...

github.com

Note: capistrano_colors was merged into Capistrano starting from v2.13.5. However, this requires Ruby 1.9+. If you cannot upgrade Capistrano...

github.com

Ruby bindings for Sundown, a fast and full-featured Markdown parser that lets you define renders for arbitrary output formats...

makandracards.com

Our rcov:all task for aggregated RSpec/Cucumber coverage was overhauled extensively. Among other things it now works for Rails 2...

Association named 'variations' was not found; perhaps you misspelled it? I just was hunting down a strange error with this...

makandra dev

When you're getting this error, one possibility is that you've created a select field for an association instead...

jstorimer.com

Guide to writing CLI scripts in Ruby that play nice with pipe chains.

One of the most common production errors are ActionController::MethodNotAllowed errors. They usually happen when someone reloads a form by...

github.com

When internationalizing your Rails app, you'll be replacing strings like 'Please enter your name' with t('.name_prompt'). You...

github.com

When Rack::Bug has been added to your project and your Apache2/Passenger only replies with an Error 500 (Internal Server...