Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
with_options :env => "test" do |test| | |
test.gem "cucumber" | |
test.gem "cucumber-rails" | |
end | |
with_options :env => "development" do |dev| | |
dev.gem "hirb" | |
end | |
gem "authlogic" | |
gem "will_paginate" | |
gem "haml" # only used for sass so compass works |
require 'i18n' | |
if Rails.env.development? | |
module I18n | |
class << self | |
def translate_with_debug(*args) | |
puts "Translate: #{args.inspect}" | |
translate_without_debug(*args) | |
end | |
alias_method_chain :translate, :debug |
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" | |
### Added by the Heroku Toolbelt | |
export PATH="/usr/local/heroku/bin:$PATH" | |
### Increase History size | |
export HISTSIZE=10000 | |
export HISTCONTROL=erasedups |
#!/usr/bin/env ruby | |
require 'fileutils' | |
webricks = Dir.glob(File.join("/home/#{ENV['USER']}/.rvm/rubies/**/webrick/config.rb")) | |
webricks.each do |webrick| | |
FileUtils.cp webrick, "#{webrick}.bak" | |
output = File.read(webrick).gsub('DoNotReverseLookup => nil', 'DoNotReverseLookup => true') | |
File.open(webrick, "w") {|file| file.puts output} | |
end |
source 'http://rubygems.org' | |
gem 'rails', '3.2.12' | |
gem 'mysql2' | |
gem 'unicorn' | |
gem "therubyracer", ">= 0.8.2" | |
gem 'fastercsv' if RUBY_VERSION < "1.9" |
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
// app/views/users/index.html.haml | |
= javascript_include_tag '//maps.google.com/maps/api/js?v=3.13&sensor=false&libraries=geometry' | |
= javascript_include_tag '//google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.14/src/markerclusterer_packed.js' | |
#map{style: "height: 400px;"} | |
:javascript | |
window.load_google_map('map', #{@map_markers}) |
class @GoogleAnalytics | |
@load: -> | |
# Google Analytics depends on a global _gaq array. window is the global scope. | |
window._gaq = [] | |
window._gaq.push ["_setAccount", GoogleAnalytics.analyticsId()] | |
# Create a script element and insert it in the DOM | |
ga = document.createElement("script") | |
ga.type = "text/javascript" |
class ConvertDbToUtf8 < ActiveRecord::Migration | |
def self.up | |
if Rails.env.production? | |
db_config = ActiveRecord::Base.connection.instance_values["config"] | |
db_name = db_config[:database] | |
db_user = db_config[:username] | |
db_pass = db_config[:password] || '' | |
latin1_dump = 'latin1_dump.sql' |
source 'https://rubygems.org' | |
gem 'rails', '4.2.4' | |
gem 'rails-i18n' | |
gem 'sass-rails', '~> 5.0' | |
gem 'uglifier', '>= 1.3.0' | |
gem 'coffee-rails', '~> 4.1.0' | |
gem 'slim-rails' | |
gem 'pg' |