Skip to content

Instantly share code, notes, and snippets.

View hone's full-sized avatar

Terence Lee hone

View GitHub Profile
commands:
plugins:enable <gem name> # would not install, just enable in config
plugins:disable <gem name> # disables gem from config, but does not uninstall the gem
plugins:install <gem name> # install and enable the gem
plugins:uninstall <gem name> # uninstall and remove from the config
$ DEBUG=true bundle install --deployment
Some gems seem to be missing from your vendor/cache directory.
Could not find devise-1.2.rc2 in any of the sources
/home/hone/.rvm/gems/ree-1.8.7-2011.02@heroku_work/gems/bundler-1.0.10/lib/bundler/spec_set.rb:87:in `materialize'
/home/hone/.rvm/gems/ree-1.8.7-2011.02@heroku_work/gems/bundler-1.0.10/lib/bundler/spec_set.rb:81:in `map!'
/home/hone/.rvm/gems/ree-1.8.7-2011.02@heroku_work/gems/bundler-1.0.10/lib/bundler/spec_set.rb:81:in `materialize'
/home/hone/.rvm/gems/ree-1.8.7-2011.02@heroku_work/gems/bundler-1.0.10/lib/bundler/definition.rb:90:in `specs'
/home/hone/.rvm/gems/ree-1.8.7-2011.02@heroku_work/gems/bundler-1.0.10/lib/bundler/definition.rb:78:in `resolve_with_cache!'
/home/hone/.rvm/gems/ree-1.8.7-2011.02@heroku_work/gems/bundler-1.0.10/lib/bundler/installer.rb:34:in `run'
/home/hone/.rvm/gems/ree-1.8.7-2011.02@heroku_work/gems/bundler-1.0.10/lib/bundler/installer.rb:8:in `install'
require 'bundler/setup'
require 'sinatra'
get '/' do
"Sinatra Bro"
end
get '/sleep' do
sleep 30
'Timeout'
$ gem install carmen --no-ri --no-rdoc
Fetching: carmen-0.2.6.gem (100%)
ERROR: Error installing carmen:
carmen requires carmen (>= 0, runtime)
File.open(File.dirname(__FILE__), 'r') do |file|
puts file.external_encoding
end
project_type = :rails
project_path = Compass::AppIntegration::Rails.root
environment = Compass::AppIntegration::Rails.env
http_path = "/"
css_dir = "tmp/stylesheets"
sass_dir = "app/views/stylesheets"
module Rack
class LogplexException
def initialize(app)
@app = app
end
def call(env)
begin
body = @app.call(env)
unless File.exists?("rake-0.8.7.gem")
puts 'downloading rake gem...'
require 'open-uri'
File.open('rake-0.8.7.gem','w'){|f| f.write open("http://production.cf.rubygems.org/gems/rake-0.8.7.gem").read }
end
require 'zlib'
require 'rubygems/format'
class Zlib::GzipReader
$ time ruby die.rb
[Wed Dec 29 22:04:56 -0600 2010, 1]
die.rb:15:in `initialize': not in gzip format (Zlib::GzipFile::Error)
from die.rb:15:in `new_orig'
from die.rb:15:in `new'
from /home/hone/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize'
from /home/hone/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:64:in `each'
from /home/hone/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:55:in `loop'
from /home/hone/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:55:in `each'
from /home/hone/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:32:in `initialize'
class DisplayController < ApplicationController
def file
send_file("./flower.jpg", :disposition => "inline", :stream => true, :type => "image/jpg")
end
def data
send_data(File.read('./flower.jpg'), :disposition => "inline", :stream => true, :type => "image/jpg")
end
end