Skip to content

Instantly share code, notes, and snippets.

Elas Projetam
Elas Prosperam
Site para o cliente contratar o serviço (com pagamento automático)
- Empresa Pública
- Empresa Privada
Cadastro de Profissionais
Backoffice Elas Prosperam
Elas App
ActionController::RoutingError - uninitialized constant ApplicationController:
actionpack (4.1.2) lib/action_dispatch/routing/route_set.rb:71:in `rescue in controller'
actionpack (4.1.2) lib/action_dispatch/routing/route_set.rb:66:in `controller'
actionpack (4.1.2) lib/action_dispatch/routing/route_set.rb:46:in `call'
actionpack (4.1.2) lib/action_dispatch/journey/router.rb:71:in `block in call'
actionpack (4.1.2) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.1.2) lib/action_dispatch/routing/route_set.rb:678:in `call'
railties (4.1.2) lib/rails/engine.rb:514:in `call'
railties (4.1.2) lib/rails/railtie.rb:194:in `method_missing'
actionpack (4.1.2) lib/action_dispatch/journey/router.rb:71:in `block in call'
class CreateCashes < ActiveRecord::Migration
def change
create_table :cashes do |t|
t.datetime :start_at
t.datetime :end_at
t.decimal :value_open
t.decimal :value_phisic_closed
t.decimal :value_system_closed
t.timestamps
@matheusvetor
matheusvetor / railscasts.rb
Created June 13, 2013 12:47
A ruby script for download all railscasts episodes from rss
#!/usr/bin/env ruby
begin
require 'rubygems'
rescue LoadError
end
require 'nokogiri'
require 'open-uri'
f = open('http://feeds.feedburner.com/railscasts')
class Banner < ActiveRecord::Base
attr_accessor :image_width, :image_height
mount_uploader :image, ImageUploader
validate :check_dimensions
def check_dimensions
if !self.image_cache.nil?
errors.add :image, "Dimensions of uploaded avatar should be not less than 150x150 pixels." if self.upload_width < 150 || self.upload_height < 150
end
# Mac OSX
# Ruby on Rails Development Environment
#After Install Xcode and Command Line Tools:
# Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Basic packages
brew install macvim imagemagick mysql postgresql redis git ack mongodb node