Skip to content

Instantly share code, notes, and snippets.

View candidosales's full-sized avatar
🎧
Focusing

Candido Sales Gomes candidosales

🎧
Focusing
View GitHub Profile
@candidosales
candidosales / Gruntfile.js
Created June 14, 2013 03:45
Tutorial de grunt.js
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
-----> Migrating database
$ RAILS_ENV="production" bundle exec rake db:migrate
rake aborted!
undefined method `fetch' for false:FalseClass
/var/www/mirafloris/tmp/build-136935383314531/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:35:in `resolve_string_connection'
/var/www/mirafloris/tmp/build-136935383314531/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
! ERROR: Deploy failed. /var/www/mirafloris/tmp/build-136935383314531/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
/var/www/mirafloris/tmp/build-136935383314531/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/railtie.rb:82:in `block (2 levels) in <class:Railtie>'
chmod 400 mirafloris.pem
-Quando criar a instância EC2 escolha o Group Security "quick-start-1"
-Verifique se seu servidor permite o acesso pela porta 22 para conexões SSH.
ssh -i ~/.ec2/mirafloris.pem ubuntu@54.232.212.142
*Se apresentar este erro:
Failed to add the host to the list of known hosts (/home/candidosg/.ssh/known_hosts).
@candidosales
candidosales / canvas-install
Created May 21, 2013 23:51
Instalação do Canvas no ubuntu
--------------PostgreSQL
sudo apt-get install postgresql-9.1
sudo apt-get install postgresql-server-dev-9.1
sudo -u postgres createuser candidosg
--------------Node
sudo add-apt-repository ppa:chris-lea/node.js
(function() {
window.DS = Ember.Namespace.create({
// this one goes past 11
CURRENT_API_REVISION: 12
});
})();
(function() {
// Version: v1.0.0-rc.1-188-gb6bb967
// Last commit: b6bb967 (2013-03-16 18:09:42 -0700)
(function() {
/*global __fail__*/
/**
Ember Debug
/home/ubuntu/midiaexterna/current/,ubuntu,/home/ubuntu/midiaexterna/current/config/puma.rb,/home/ubuntu/midiaexterna/current/config/log/puma.log
#! /bin/sh
### BEGIN INIT INFO
# Provides: puma
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
upstream midiaexterna {
server unix:///home/ubuntu/midiaexterna/current/tmp/puma.sock;
}
server {
listen 80;
server_name 177.71.250.61;
keepalive_timeout 5;
rails_env = ENV['RAILS_ENV'] || 'development'
threads 4,4
bind "unix:///home/ubuntu/midiaexterna/current/tmp/puma.sock"
pidfile "/home/ubuntu/midiaexterna/current/tmp/puma/pid"
state_path "/home/ubuntu/current/midiaexterna/tmp/puma/state"
activate_control_app