Skip to content

Instantly share code, notes, and snippets.

View drewdeponte's full-sized avatar

Drew De Ponte drewdeponte

View GitHub Profile
@drewdeponte
drewdeponte / snippet.txt
Created December 16, 2011 00:22
telling bundle to pass rvm source path for bcrypt
bundle config build.bcrypt-ruby --with-ruby-include="${rvm_path}/src/ruby-1.9.2-p290"
@drewdeponte
drewdeponte / snippet.txt
Created December 15, 2011 17:23
bcrypt-ruby-3.0.1 failed to build native extensions
* executing "cd /var/www/rpp_web_app/releases/20111215022008 && bundle install --gemfile /var/www/rpp_web_app/releases/20111215022008/Gemfile --path /var/www/rpp_web_app/shared/bundle --deployment --quiet"
servers: ["db02"]
[db02] executing command
** [out :: db02] Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
** [out :: db02]
** [out :: db02] /home/rpi/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
** [out :: db02]
** [out :: db02] Gem files will remain installed in /var/www/rpp_web_app/shared/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.0.1 for inspection.
** [out :: db02] Results logged to /var/www/rpp_web_app/shared/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out
** [out :: db02] An error occured while installing bcrypt-ruby (3.0.1), and Bundler cannot continue.
* executing "type rvm | head -n 1 && rvm rvmrc trust /var/www/rpp_web_app/releases/20111215014722 && rvm rvmrc load /var/www/rpp_web_app/releases/20111215014722"
servers: ["db02"]
[db02] executing command
** [out :: db02] rvm is /home/rpi/.rvm/bin/rvm
** [out :: db02] Marked /var/www/rpp_web_app/releases/20111215014722/.rvmrc as trusted
** [out :: db02] DREW: test rvm function/binary
** [out :: db02] rvm is a function
** [out :: db02] DREW: test rvm function/binary
** [out :: db02] DREW: somehow we are in here even though the thing exists
** [out :: db02] ruby-1.9.2-p290@rpp_web_app --trace
@drewdeponte
drewdeponte / deploy.rb
Created December 15, 2011 01:18
rvm capistrano tasks
namespace :rvm do
desc 'Trust rvmrc file'
task :trust_rvmrc do
run "rvm rvmrc trust #{current_release}"
run "rvm rvmrc load #{current_release}"
end
end
@drewdeponte
drewdeponte / snippet.txt
Created December 15, 2011 01:08
output of failing rvm cap deploy
* executing "rvm rvmrc trust /var/www/rpp_web_app/releases/20111215010614"
servers: ["db02"]
[db02] executing command
** [out :: db02] Marked /var/www/rpp_web_app/releases/20111215010614/.rvmrc as trusted
command finished in 1052ms
* executing "rvm rvmrc load /var/www/rpp_web_app/releases/20111215010614"
servers: ["db02"]
[db02] executing command
** [out :: db02] DREW: env path: /home/rpi/.rvm/environments/ruby-1.9.2-p290@rpp_web_app
** [out :: db02] DREW: whoami
@drewdeponte
drewdeponte / .rvmrc
Created December 15, 2011 00:13
project specific rvmrc in dev
#!/usr/bin/env bash
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
# First try to load from a user install
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"
else
printf "ERROR: An RVM installation was not found.\n"
@drewdeponte
drewdeponte / snippet.txt
Created December 15, 2011 00:06
output of .rvmrc trust from capistrano
* executing "rvm rvmrc trust /var/www/rpp_web_app/releases/20111214235854"
servers: ["db02"]
[db02] executing command
** [out :: db02] Marked /var/www/rpp_web_app/releases/20111214235854/.rvmrc as trusted
command finished in 919ms
@drewdeponte
drewdeponte / snippet.txt
Created December 15, 2011 00:01
trace of rvm --create foo@bar in .rvmrc run by capistrano
** [out :: db02] rvm 1.10.0 by Wayne E. Seguin ([email protected]) [https://rvm.beginrescueend.com/]
** [out :: db02]
** [out :: db02] +++ [[ -n '' ]]
** [out :: db02] +++ export 'PS4=+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
** [out :: db02] +++ PS4='+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
** [out :: db02] +++ /scripts/cli : __rvm_parse_args() 743 > [[ -z rvmrc ]]
** [out :: db02] +++ /scripts/cli : __rvm_parse_args() 745 > [[ 0 -eq 1 ]]
** [out :: db02] +++ /scripts/cli : __rvm_parse_args() 745 > [[ -n '' ]]
** [out :: db02] +++ /scripts/cli : __rvm_parse_args() 36 > [[ -n '' ]]
** [out :: db02] +++ /scripts/cli : __rvm_parse_args() 749 > [[ 0 -gt 0 ]]
Last login: Thu Sep 1 16:23:00 on ttys003
[~]$ sudo dscl . create /Users/jenkins
Password:
[~]$ sudo dscl . create /Users/jenkins PrimaryGroupID 1
[~]$ sudo dscl . create /Users/jenkins UniqueID 300
[~]$ sudo dscl . create /Users/jenkins UserShell /bin/bash
[~]$ sudo dscl . passwd /Users/jenkins 3d4b66
[~]$ sudo dscl . create /Users/jenkins home /Users/Shared/Jenkins/Home/
[~]$ sudo launchctl unload -w /Library/LaunchAgents/org.jenkins-ci.plist
launchctl: Couldn't stat("/Library/LaunchAgents/org.jenkins-ci.plist"): No such file or directory
include LinkedinHelpers
include FacebookHelpers
include Socializer
def nav_link(name, path, path_only = false)
host = path_only ? '' : RppWebApp::CONFIG['hostname']
if request.url.include?(path) || session[:nav_link_path] == path
link_to(name, host + path, { :class => "selected" })
else
link_to(name, host + path)