Skip to content

Instantly share code, notes, and snippets.

View rsyring's full-sized avatar

Randy Syring rsyring

View GitHub Profile
<li>
<strong>tracker</strong>:
<span class="tracker">Tasks</span>
</li>
The issues I had with directions for passenger and RVM on ubuntu server 9.04 from this page: http://rvm.beginrescueend.com/integration/passenger/
1) The first issue I have is that it wasn't clear that I had to have a LoadModule after running passenger-install-apache2module. It says in the instructions to ignore what passengers says about passenger_ruby, so I just ignored everything. With that being true, PassengerRuby as a config item was an error, therefore I had to do LoadModule per the instructions from passenger-install-apache2-module.
2) Ditto for the PassengerRoot configuration. I didn't have it originally and I ended up needing to put in there what passenger-install-apache2-module told me to put in there.
3) The code snippet for setting GEM_HOME:
ENV["GEM_HOME"]=%x{"source ~/.bash_profile ; rvm ree%pancake ; rvm gemdir"}.strip
did not work. I got an error that 'source' was not found for the shell 'sh'. I tried the command without the source part, but `rvm gemdir` didn't give the correct gemset
rsyring@antec:~/dev/onebody$ rake onebody:load_sample_data
(in /home/rsyring/dev/onebody)
no such file to load -- bson
<...snip backtrace...>
Missing these required gems:
mongo >= 0.20
You're running:
rsyring@antec:~/dev/onebody$ rake onebody:load_sample_data
(in /home/rsyring/dev/onebody)
rake aborted!
undefined method `symbolize_keys!' for nil:NilClass
(See full trace by running task with --trace)
from isapi import isapicon, threaded_extension
import sys
import traceback
try:
from urllib import urlopen
except ImportError:
# py3k spelling...
from urllib.request import urlopen
import win32api
@rsyring
rsyring / _loader.py
Created February 15, 2011 20:21
Simplified isapi_wsgi
from os import path
from pprint import PrettyPrinter
import sys
from traceback import format_exc
class ErrorApp(object):
""" this will be used if an exception is caused by the iwhelper import """
def __init__(self, trace, debug_info):
self.debug_info = debug_info
self.trace = trace
import isapi_wsgi
from fakeecb import FakeECB
from random import random
import time
from profiledec import profile
def wsgiapp(environ, start_response):
'''Simple app as per PEP 333'''
status = '200 OK'
#time.sleep(.1)
Tue Feb 15 17:27:18 2011 c:\users\randys~1\appdata\local\temp\tmpkg6_ok
1590097 function calls in 17.619 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 17.619 17.619 <string>:1(<module>)
1 0.057 0.057 17.619 17.619 test_iw.py:20(dotest)
10000 0.171 0.000 17.562 0.002 test_iw.py:17(simreq)
Wed Feb 16 17:44:56 2011 c:\windows\temp\tmp6ri9no
149 function calls in 0.002 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.002 0.002 <string>:1(<module>)
1 0.000 0.000 0.002 0.002 C:\Python27\lib\site-packages\isapi_wsgi-0.4.2-py2.7-win32.egg\isapi_wsgi.py:432(_run_app)
@rsyring
rsyring / install-monodevelop-2.8.6.5.sh
Created March 4, 2012 22:06
Script to Install MonoDevelop 2.8.6.5 on Ubuntu 11.10 Oneiric
#!/bin/bash -e
TOPDIR=$(pwd)
BUILDDIR=$TOPDIR/build
PREFIX=/opt/mono-2.10
export PATH=$PREFIX/bin:$PATH
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH