If you have to build a filename (e.g. for use in downloads) that contains user input, keep in mind that...

My RubyMine (and it seems like many other Java GUI applications) crashes the Compiz window decorator almost every time on...

If you want to use a helper_method my_helper_method inside a model, you can write ApplicationController.helpers.my_helper...

gist.github.com

When you encouter an unsafe string that you actually made html_safe before, perhaps you called one of the following...

makandra dev

This card explains how to upgrade an existing RubyMine installation to a newer version. If you're installing RubyMine for...

devnet.jetbrains.net

To activate the shell command, go to Tools > Create Command-line Launcher and confirm. Now you have mine as bash...

qatechnotes.blogspot.com

If you encounter above mentioned failiure message after installing the ruby-debug gem then you have to explicitly require linecache...

When rendering a number, you want to pretty up the string coming from #to_s: Render 0.0 as 0

shopify.com

Most web applications contain several examples of state machines, including accounts and subscriptions, invoices, orders, blog posts, and many more...

yehudakatz.com

Yesterday, there was a blog post entitled “What the Hell is Happening to Rails” that stayed at the number one...

I encountered a bug in RSpec 1.x where stubbed class methods ("static methods") would not be unstubbed before the...

I pushed a new version of the Cucumber Factory gem. This new release lets you refer to a previously created...

superuser.com

Ubuntu natty introduced new "invisible" scrollbars for GTK programs such as gEdit or Nautilus. If you do not like them...

For Email-Patterns see most recent E-Mail-Pattern. HOST = /\A[a-z0-9]+[a-z0-9\-\.]*[a-z0-9...

(Rails has a method ActiveRecord::Relation#merge that can merge ActiveRecord scopes. However, its behavior has never been clear, and...

This snippet makes links that refer to an anchor (like "...

...") scroll softly to it.\ In this example we only do...

Note: In Rails 3+ you can use Array.wrap instead of the solution here. In the past you could use Array...

crazylittlehacks.blogspot.com

I found a nice script on crazylittlehacks and modified it slightly. Put the attachment to /usr/local/bin, chmod +x and run...

Copy the attached Ruby code to config/initializers, or paste it into your IRB console. You can now dump any two...

Update: Staticmatic will not be further developed. They suggest to switch to middleman. If you need to make a static...

yehudakatz.com

When running an executable, ALWAYS use bundle exec. In some cases, running executables without bundle exec may work, if the...

blog.jayfields.com

Deprecated ways to execute shell code in Ruby This is just a reference for legacy code. For new code, always...

When your cucumber features grow massively over time, the test execution can take a lot of time.

howtogeek.com

One of the more controversial changes in the Ubuntu 10.04 beta is the Mac OS-inspired change to have window...