Reading a URL via GET: curl http://example.com/ Defining any HTTP method (like POST or PUT): curl http://example.com/users/1...
User.active.to_sql Rails 2 Use either the Edge Rider or fake_arel gem to get #to_sql backported...
Since version 1.5 RubyGems requires at least Ruby 1.8.7. The last one working with Ruby 1.8.6 was RubyGems 1.4.2.
When installing RMagick you may get an error messages like this: Version 2.13.1: checking for Ruby version >= 1.8.5... yes
Phillip Koebbe from Ruby on Rails suggested inserting following code between the "bootstrap" and "initialize" sections of enviroment.rb. This hack...
If you just upgraded to Bundler 10.0.10 you might get the following error when bringing up Rails: /usr/lib/ruby/1.9.1/psych.rb:148:in...
Note that you cannot currently use Ruby 1.9.2 with Rails 2 applications that use RSpec, so don't upgrade if...
Specify these gem versions in your Gemfile: gem 'cucumber', '~> 1.3.0' gem 'cucumber-rails', '= 0.3.2' # max version for Rails 2
Add deprecation warnings and their solution or link to available solutions. Global access to Rake DSL methods is deprecated. Please...
We are maintaining some vintage projects with tests written in Test::Unit instead of RSpec. Mocks and stubs are not...
When working with large Sass files you will notice that the first request after a change to a Sass file...
You will occasionally need to clean out your database while keeping the schema intact, e.g. when someone inserted data in...
After updating your RubyGems, you will probably not be able to run Capistrano any more, but receive an error similar...
RubyGems 1.6.0 has undergone some changes which may cause Rails 2.x applications to break with an error like this...
On 32bit systems, the maximum representable Time is 2038-01-19 03:14:07 in UTC or 2038-01-19...
This tool is used on our application servers (and called when deploying) but it also works locally. Just call dumple...
The code below shows a method #validate which uses Nokogiri to validate an XML document against an XSD schema. It...
When defining a trait using the Modularity gem, you must take extra steps to define constants to avoid caveats (like...
In case https://www.rubydoc.info/ is to slow or offline, you can also read a gem documentation offline. Start a server...
Are you adding a "Then show me the page" and re-run Cucumber whenever there is a failing scenario? Don...
Call geordi clean from a project root to remove unused and unnecessary files inside it. This script is part of...
You can usually just use the eq matched to compare two numbers: expect(deal.total).to eq(120)
Ruby's net/http is setup to never verify SSL certificates by default. Most ruby libraries do the same. That means...
Use the htmlentities gem. Encoding works like this: require 'htmlentities' coder = HTMLEntities.new string = "<élan>" coder.encode(string) # => "<élan>"