Although the content we are covering will run under most Ruby versions, we recommend you run Ruby 1.9.2.
There's no point re-inventing the wheel so here's some existing guides to installing on OS X and Ubuntu:
require 'delegate' | |
class Child | |
def open | |
"HELLO WORLD" | |
end | |
def ping | |
"PING" | |
end | |
end |
module Lukes::Core::Module | |
extend ActiveSupport::Concern | |
included do | |
include ActiveModel::Validations | |
end | |
end |
65 scenarios (65 passed) | |
280 steps (280 passed) | |
0m4.091s | |
Run options: --seed 8782 | |
# Running tests: | |
<%= form_for :question, :url => step1_path do -%> | |
<% for question in @questions %> | |
<%= fields_for "answers[]", Answer.new(question_id: question.id) do |li_fields| %> | |
<%= li_fields.label :title, question.title %> | |
<%= li_fields.hidden_field :question_id %> | |
<%= li_fields.text_field :weight %> | |
<% end %> | |
<% end %> | |
<%= submit_tag "Create line items" %> | |
<% end %> |
{ | |
"Message": "An error has occurred.", | |
"ExceptionMessage": "com.garmin.service.exception.ServiceException: java.lang.NullPointerException", | |
"ExceptionType": "System.ServiceModel.FaultException`1[[Garmin.Cartography.Services.Rce.WebServiceWrapper.ITMapUpdateServiceReference.ServiceException, Garmin.Cartography.Services.Rce.WebServiceWrapper, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null]]", | |
"StackTrace": "\r\nServer stack trace: \r\n at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)\r\n at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)\r\n at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)\r\n at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)\r\n\r\nException rethrown at [0]: \r\n at System.Runtime.Remotin |
Fixnum.class_eval do | |
def percent_of_the_time | |
if (rand * 100) < self | |
yield | |
end | |
end | |
end | |
80.percent_of_the_time do | |
puts "LAL" |
require 'simple_form' | |
# Use this setup block to configure all options available in SimpleForm. | |
SimpleForm.setup do |config| | |
# .... | |
end |
class NewController < SomeOtherController | |
include Cms::Controller | |
crud_for ArticleManager | |
add_rescue :create, SomeOtherError do |error| | |
redirect_to root_path | |
end | |
end | |
source "http://rubygems.org" | |
gem 'goliath', :git => "git://github.com/postrank-labs/goliath.git" |
Although the content we are covering will run under most Ruby versions, we recommend you run Ruby 1.9.2.
There's no point re-inventing the wheel so here's some existing guides to installing on OS X and Ubuntu: