Skip to content

Instantly share code, notes, and snippets.

View gabeodess's full-sized avatar

Gabe Odess gabeodess

  • RigUp
  • Austin TX
View GitHub Profile
** Daemonized, any open files are closed. Look at log/mongrel.8000.pid and log/mongrel.8000.log for info.
** Starting Mongrel listening at 0.0.0.0:8000
** Initiating groups for "mongrel":"mongrel".
** Changing group to "mongrel".
** Changing user to "mongrel".
** Starting Rails with production environment...
/usr/lib/ruby/1.8/open-uri.rb:88:in `initialize': Permission denied - /var/www/wwwcom/log/production.log (Errno::EACCES)
from /usr/lib/ruby/1.8/open-uri.rb:88:in `open'
from /usr/lib/ruby/1.8/logger.rb:527:in `open_logfile'
from /usr/lib/ruby/1.8/logger.rb:496:in `initialize'
## Models
class Bank < ActiveRecord::Base
using_access_control
has_many :bank_accounts
has_many :bank_statements
validates_presence_of :name
end
Here is the backtrace I am getting. I have not done anything except follow the instruction to setup split at: https://github.com/andrew/split
## View
<%= f.submit ab_test('csn_submit_button', 'Submit', 'Submit!'), data:{disable_with:'...'}, class:'btn btn-primary' %>
## Controller
finished('csn_submit_button') if URI.parse(request.referrer).path == root_path
## Error message
argument out of range
User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = 3178 LIMIT 1
Geokit is using the domain: localhost
AdminUser Load (0.4ms) SELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" IN (0, 2, 0) LIMIT 1
SQL (8.3ms) UPDATE "users" SET "last_login_at" = '2014-05-20 13:08:40.242561' WHERE "users"."id" = 3178
Farm Load (2.4ms) SELECT "farms".* FROM "farms" WHERE "farms"."user_id" = 3178 AND "farms"."status" = 'approved' LIMIT 1
Farm Load (0.7ms) SELECT "farms".* FROM "farms" WHERE "farms"."status" = 'approved' AND "farms"."user_id" = 3178 LIMIT 1
Delivery Load (0.5ms) SELECT "deliveries".* FROM "deliveries" WHERE "deliveries"."farm_id" = 82 AND "deliveries"."id" = $1 LIMIT 1 [["id", "1287"]]
Farm Exists (0.4ms) SELECT 1 AS one FROM "farms" WHERE (("farms"."user_id" = 3178 AND "farms"."status" = 'approved')) LIMIT 1
(0.8ms) BEGIN
Share Load (1.1ms) SELECT "shares".* FROM "shares" WHERE "shares"."delivery_id" = 1287 AND "shares"."id" IN (11301, 11308, 11321,
@gabeodess
gabeodess / deliveries.rb
Last active August 29, 2015 14:01
Nested attributes being ignored for large requests.
class Delivery < ActiveRecord::Base
with_options :dependent => :destroy do |i|
i.has_many :stops
i.has_many :shares, :inverse_of => :delivery
end
with_options :through => :stops do |i|
i.has_many :drop_offs
end
Started PUT "/merchant_center/deliveries/1287" for 127.0.0.1 at 2014-05-20 09:08:35 -0400
DEPRECATION WARNING: Database connections will not be closed automatically, please close your
database connection at the end of the thread by calling `close` on your
connection. For example: ActiveRecord::Base.connection.close
. (called from mon_synchronize at /Users/gabeodess/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/monitor.rb:211)
DEPRECATION WARNING: Database connections will not be closed automatically, please close your
database connection at the end of the thread by calling `close` on your
connection. For example: ActiveRecord::Base.connection.close
. (called from mon_synchronize at /Users/gabeodess/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/monitor.rb:211)
DEPRECATION WARNING: Database connections will not be closed automatically, please close your
@gabeodess
gabeodess / Explanation
Created September 25, 2014 14:36
Thread:: superclass on my controller not found
When I visit "/queue/competitors" I get the following error:
uninitialized constant Thread::Queue::CompetitorsController
with a list of all my routes including this one:
queue_competitors_path GET /queue/competitors(.:format) queue/competitors#index
@gabeodess
gabeodess / not-working
Created November 5, 2014 23:22
ffprobe output
gabeodess@Gabriels-MacBook-Air-4:~/Desktop$ffprobe market-sd.mp4
ffprobe version 2.2.3 Copyright (c) 2007-2014 the FFmpeg developers
built on Nov 4 2014 12:47:40 with Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.2.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libvorbis --enable-libvpx
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libavresample 1. 2. 0 / 1. 2. 0
@gabeodess
gabeodess / mp4
Created November 5, 2014 23:32
ffmpeg for Web
$ffmpeg -i market2.mp4 -vcodec libx264 -acodec libfaac -s 640x360 -vb 872000 -an -profile main -pix_fmt yuv420p -movflags +faststart market-sd.mp4
ffmpeg version 2.2.3 Copyright (c) 2000-2014 the FFmpeg developers
built on Nov 4 2014 12:47:40 with Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.2.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libvorbis --enable-libvpx
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libavresample 1. 2. 0 / 1. 2. 0
@gabeodess
gabeodess / application_helper.rb
Last active August 29, 2015 14:10
A simple helper for debugging long running code.
# Usage:
# timestamp('some descriptive key') do
# sleep 20
# end
# => check your logs.
def timestamp(key, &block)
start = Time.now
yield
p ["custom-timestamp: #{key}", Time.now - start] if !Rails.env.test?
end