Skip to content

Instantly share code, notes, and snippets.

View lxcodes's full-sized avatar

Alexander lxcodes

  • fh group
  • Erie, PA
View GitHub Profile
NoMethodError: undefined method `bytesize' for #<Entry:0x0000000376beb8>
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/utils.rb:250:in `bytesize'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.6/lib/sinatra/base.rb:82:in `block in finish'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.6/lib/sinatra/base.rb:81:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.6/lib/sinatra/base.rb:81:in `inject'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.6/lib/sinatra/base.rb:81:in `finish'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.6/lib/sinatra/base.rb:654:in `call!'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.6/lib/sinatra/base.rb:629:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/showexceptions.rb:24:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/session/abstract/id.rb:195:in `context'
@lxcodes
lxcodes / gist:1053867
Created June 29, 2011 13:48
Seg Fault Error
web9@server:~/web/_ruby$ thor users:create
DataObjects::URI.new with arguments is deprecated, use a Hash of URI components (/usr/local/rvm/gems/ruby-1.9.2-p180/gems/dm-do-adapter-1.1.0/lib/dm-do-adapter/adapter.rb:231:in `new')
/var/www/clients/client0/web9/web/_ruby/CreateUsers.thor:25:in `initialize': No such file or directory - /var/www/clients/client0/web9/web/_ruby/rb/config/users/users_others.csv (Errno::ENOENT)
from /var/www/clients/client0/web9/web/_ruby/CreateUsers.thor:25:in `open'
from /var/www/clients/client0/web9/web/_ruby/CreateUsers.thor:25:in `create'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor/runner.rb
Dir["config/users/*"].each do |source|
Excelsior::Reader.rows(File.open(source,'rb')) do |row|
password = SecureRandom.base64(12)
company = row[6] || ''
title = row[3] || ''
user = User.new(:first_name => row[1], :last_name => row[2], :company => company, :title=>title,:email_address=>row[4],:shahash=>User.encrypt(password),:isRegistered=>false, :event=>1)
if user.save
#email
end
end
get '/:guid' do
client = Client.get(:guid => params[:guid])
halt client.inspect
end
get '/test/?' do
p = Plan.new(numOfProjects:1,name:"test",numOfActiveProjects:1,numOfCollaborators:1)
'plan :: ' << p.inspect
end
@lxcodes
lxcodes / gist:1069816
Created July 7, 2011 15:49
Stack Trace - Bundler Error - Errno::EACCES
web13@server:~/web/lococms$ bundle install
Fetching git://github.com/locomotivecms/engine.git
Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks!
/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:243:in `mkdir': Permission denied - /var/www/clients/client0/web13/.bundler (Errno::EACCES)
from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:243:in `fu_mkdir'
from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:217:in `block (2 levels) in mkdir_p'
from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:215:in `reverse_each'
from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:215:in `block in mkdir_p'
from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:201:in `each'
from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:201:in `mkdir_p'
get '/seed' do
plan = Plan.new(numOfProjects:50,name:"Tall",numOfActiveProjects:5,numOfCollaborators:50)
halt "plan = " << plan.inspect
end
@lxcodes
lxcodes / Gemfile
Created July 9, 2011 17:10
Setting up Sinatra & Bundler
source :rubygems
gem 'sinatra', '>= 1.0'
gem "mongoid", "~> 2.0"
gem "bson_ext", "~> 1.3"
gem "memcache-client"
gem "json"
Bundler::GemNotFound: Could not find slim-rails-0.2.1 in any of the sources
~/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/spec_set.rb:87:in `block in materialize'
~/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/spec_set.rb:81:in `map!'
~/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/spec_set.rb:81:in `materialize'
~/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/definition.rb:90:in `specs'
~/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/definition.rb:135:in `specs_for'
~/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/definition.rb:124:in `requested_specs'
~/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/environment.rb:23:in `requested_specs'
~/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/runtime.rb:11:in `setup'
~/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler.rb:107:in `setup'
get '/onceuponatime/?' do
raise "kaboom"
end
error do
post_error_to_airbrake!
'oops'
haml :'500'
end