Skip to content

Instantly share code, notes, and snippets.

View jathayde's full-sized avatar

John Athayde jathayde

View GitHub Profile
jathayde / gist:e7d5e1f0f74830117af8b269a4fe0e9d
Created January 3, 2023 19:25
event machine build error
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
current directory: /Users/jathayde/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/ext
/Users/jathayde/.rbenv/versions/2.7.4/bin/ruby -I /Users/jathayde/.rbenv/versions/2.7.4/lib/ruby/2.7.0 -r ./siteconf20230103-13237-irwp5a.rb extconf.rb
checking for -lcrypto... no
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
checking for rb_trap_immediate in ruby.h,rubysig.h... no
jathayde / gist:5e30ce50c741cbcd2ffe24cb6f47dad6
Created August 21, 2022 16:47
Error for st_polygon migration
== 20220413155745 CreateEvents: migrating =====================================
-- create_table(:events)
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:
undefined method `st_polygon' for #<ActiveRecord::ConnectionAdapters::PostgreSQL::TableDefinition:0x000000010eb36ca8 @conn=#<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x0000000111ff44b8 @transaction_manager=#<ActiveRecord::ConnectionAdapters::TransactionManager:0x00000001120465d8 @stack=[], @connection=#<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x0000000111ff44b8 ...>, @has_unmaterialized_transactions=true, @materializing_transactions=false, @lazy_transactions_enabled=true>, @query_cache={}, @query_cache_enabled=false, @connection=#<PG::Connection:0x0000000111ff79d8 @calls_to_put_copy_data=0, @last_status=4>, @owner=#<Thread:0x0000000108ce4d08 run>, @instrumenter=#<ActiveSupport::Notifications::Instrumenter:0x000000010f956c20 @id="a3554f4a5a37eff60096", @notifier=#<ActiveSupport::Notifications
module Attributable
extend ActiveSupport::Concern
included do
has_many :attributions, as: :attributable
has_many :sources, through: :attributions
jathayde / issue_add.rb
Created January 24, 2020 02:15
Adding Issues seed style
@l = Lodge.find_by_combined("12A")
event: true,
category_id: '',
issue_type_id: ''.
issue_number: '',
variety: '',

Keybase proof

I hereby claim:

  • I am jathayde on github.
  • I am johnathayde ( on keybase.
  • I have a public key whose fingerprint is 8F4A B2BA 3CE3 8A71 CEC2 C73E 8D82 E965 CF5F EEEC

To claim this, I am signing this object:

(0.2ms) BEGIN
(0.1ms) COMMIT
(0.1ms) BEGIN
(0.2ms) SAVEPOINT active_record_1
User Exists (1.9ms) SELECT 1 AS one FROM "users" WHERE ("users"."id" IS NOT NULL) AND "users"."slug" = $1 LIMIT $2 [["slug", "jessika-mcglynn"], ["LIMIT", 1]]
User Exists (1.8ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = $1 LIMIT $2 [["email", ""], ["LIMIT", 1]]
User Exists (1.0ms) SELECT 1 AS one FROM "users" WHERE "users"."username" = $1 LIMIT $2 [["username", "Jessika McGlynn"], ["LIMIT", 1]]
User Exists (0.6ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = $1 LIMIT $2 [["email", ""], ["LIMIT", 1]]
SQL (0.9ms) INSERT INTO "users" ("email", "encrypted_password", "created_at", "updated_at", "username", "firstname", "lastname", "slug", "roles_mask") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["email", ""], ["encrypted_password", "$2a$04$CZcmrXODtPxTI47klkAVweVdm1FDjI8fMqzXqObWeEg45O9.BM1E6"], ["created_at", "2018
<% if user_signed_in? %>
<div id="follow_lodge">
<!-- does not work when uncommented, renders code as text inline -->
<%#= render 'follows_lodges/create.js' %>
<!-- does work, but then fails on url gen, which is seperate issue -->
<%= render partial: 'shared/follow_lodge', locals: {@issueable => @followable} %>
<% end %>
FactoryGirl.define do
factory :issue do
before(:each) do
@lodge_issue = FactoryGirl.create(:lodge_issue)
@issue = @lodge_issue.issue
transient do
combined_value nil
FactoryGirl.define do
factory :issue do
association :issueable, factory: :lodge
issue_number { Faker::Number.number(2) }
quantity_issued { Faker::Number.number(2) }
description 'Test description for test issue'
oa_bb_category_id '1'
category_id '1'
issue_type_id '1'
border_color_id '1'
jathayde / Rspec output
Created October 12, 2017 19:09
Rspec error on issue
1) Issue#ordered_issues issue_type abbreviation sorts in A, B, C order, then numerics ascending
Failure/Error: self.combined = "#{issue_type.abbreviation}#{issue_number}#{variety}"
undefined method `abbreviation' for nil:NilClass
# ./app/models/issue.rb:126:in `set_combined'
# ./spec/models/issue_spec.rb:109:in `block (4 levels) in <top (required)>'
# -e:1:in `<main>'