Skip to content

Instantly share code, notes, and snippets.

View timuckun's full-sized avatar

Tim Uckun timuckun

  • Lantel Integrated Solutions
  • New Zealand
View GitHub Profile
module Util
def Util.not_implemented
raise "not implemented yet"
end
def Util.kill_process_if_exists pid
running = true
begin
Process.kill(0, pid)
#if we get here the process is alive
#!/bin/bash
DIR=$(dirname $(readlink -f $0))
BINARY=${DIR}/wkhtmltoimage-i386
OPTIONS=''
SCRIPT="${BINARY} ${OPTIONS} $1 $2"
TIMEOUT=$3
(in /usr/local/home/tim/source/ruby/rails_sites/torquebox)
*** Using highline effectively in JRuby requires manually installing the ffi-ncurses gem.
*** jruby -S gem install ffi-ncurses
rake aborted!
private method `load' called for nil:NilClass
/home/tim/.rvm/gems/jruby-1.5.6/gems/org.torquebox.capistrano-support-1.0.0.CR1/lib/torquebox/capistrano/recipes.rb:25
/home/tim/.rvm/gems/jruby-1.5.6/gems/org.torquebox.capistrano-support-1.0.0.CR1/lib/torquebox/capistrano/recipes.rb:18:in `require'
/home/tim/.rvm/gems/jruby-1.5.6/gems/org.torquebox.capistrano-support-1.0.0.CR1/lib/org.torquebox.capistrano-support.rb:18
/home/tim/.rvm/gems/jruby-1.5.6/gems/org.torquebox.capistrano-support-1.0.0.CR1/lib/org.torquebox.capistrano-support.rb:68:in `require'
@timuckun
timuckun / gist:843744
Created February 25, 2011 12:55
Weird bundle error
$bundle
Fetching source index for http://rubygems.org/
Fetching source index for http://rubygems.torquebox.org/
You have requested:
org.torquebox.container-foundation = 1.0.0.CR1
The bundle currently has org.torquebox.container-foundation locked at 1.0.0.CR1.
Try running `bundle update org.torquebox.container-foundation`
/usr/local/home/tim/source/ruby/rails_sites/torquebox $bundle update org.torquebox.container-foundation
Fetching source index for http://rubygems.org/
@timuckun
timuckun / gist:843747
Created February 25, 2011 12:56
Gemfile
source 'http://rubygems.org'
source 'http://rubygems.torquebox.org'
gem "org.torquebox.capistrano-support", "1.0.0.CR1"
gem "org.torquebox.container-foundation" , "1.0.0.CR1"
gem "org.torquebox.messaging-client" , "1.0.0.CR1"
gem "org.torquebox.messaging-container" , "1.0.0.CR1"
gem "org.torquebox.naming-client" , "1.0.0.CR1"
gem "org.torquebox.naming-container", "1.0.0.CR1"
gem "org.torquebox.rake-support" , "1.0.0.CR1"
$bundle
Fetching source index for http://rubygems.torquebox.org/
Fetching source index for http://rubygems.org/
You have requested:
org.torquebox.messaging-client = 1.0.0.CR1
The bundle currently has org.torquebox.messaging-client locked at 1.0.0.CR1.
Try running `bundle update org.torquebox.messaging-client`
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
require 'rake'
require 'torquebox/tasks'
Torquebox::Application.load_tasks
#the knob file
--
2 application:
3 root: /usr/local/home/tim/source/ruby/rails_sites/torquebox
4 env: development
~
#/config/torquebox.yml
@timuckun
timuckun / gist:873301
Created March 16, 2011 21:06
Rake error
== CreateRefinerycmsResourcesSchema: migrating ===============================
-- create_table("resources", {:force=>true})
NOTICE: CREATE TABLE will create implicit sequence "resources_id_seq" for serial column "resources.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "resources_pkey" for table "resources"
-> 0.0050s
== CreateRefinerycmsResourcesSchema: migrated (0.0055s) ======================
== CreateNewsItems: migrating ================================================
-- create_table(:news_items, {:id=>true})
NOTICE: CREATE TABLE will create implicit sequence "news_items_id_seq" for serial column "news_items.id"
User.find(:all).each do |user|
user.plugins.create(:name => "refinerycms_news",
:position => (user.plugins.maximum(:position) || -1) +1)
end
page = Page.create(
:title => "News",
:link_url => "/news",
:deletable => false,
:position => ((Page.maximum(:position, :conditions => {:parent_id => nil}) || -1)+1),