Skip to content

Instantly share code, notes, and snippets.

@tarky
tarky / gist:007720ca258abb295297
Created December 15, 2015 10:11
openssl reinstall for middleman s3_sync
hoge-no-MacBook-Air:saraly hoge$ sudo brew update
Password:
Updated Homebrew from c07e70ae to 1a5181f0.
Updated 5 taps (caskroom/cask, homebrew/binary, homebrew/dupes, homebrew/php, homebrew/versions).
==> New Formulae
amdatu-bootstrap git-fresh pond
ansible-cmdb gsar qjackctl
apcupsd homebrew/php/phan rubberband
arx homebrew/php/php54-mongodb saldl
aws-apigateway-importer homebrew/php/php55-mongodb spandsp
@tarky
tarky / gist:4c5cda74d8bab1b74e66
Created December 15, 2015 05:13
old openssl error
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/2.1.0/openssl/buffering.rb:383:in `syswrite_nonblock': Bad address (Errno::EFAULT) (Excon::Errors::SocketError)
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/2.1.0/openssl/buffering.rb:383:in `write_nonblock'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/excon-0.45.4/lib/excon/socket.rb:243:in `block in write_nonblock'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/excon-0.45.4/lib/excon/socket.rb:238:in `loop'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/excon-0.45.4/lib/excon/socket.rb:238:in `write_nonblock'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/excon-0.45.4/lib/excon/socket.rb:78:in `write'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/excon-0.45.4/lib/excon/connection.rb:152:in `request_call'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/excon-0.45.4/lib/excon/middlewares/mock.rb:47:in `request_call'
from /Users/hoge/.rbenv/versions/2.1.2
@tarky
tarky / gist:2b4deb9a9416466b1575
Created December 15, 2015 03:53
no 'mime-types' error when s3_sync
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fog-core-1.35.0/lib/fog/storage.rb:68:in `get_content_type': uninitialized constant Fog::Storage::MIME (NameError)
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fog-core-1.35.0/lib/fog/storage.rb:79:in `parse_data'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fog-aws-0.7.6/lib/fog/aws/requests/storage/put_object.rb:39:in `put_object'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fog-aws-0.7.6/lib/fog/aws/models/storage/file.rb:212:in `save'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fog-core-1.35.0/lib/fog/core/collection.rb:51:in `create'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-s3_sync-3.3.4/lib/middleman/s3_sync/resource.rb:86:in `block in create!'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-s3_sync-3.3.4/lib/middleman/s3_sync/resource.rb:126:in `open'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/
@tarky
tarky / gist:838c73ee3db894cc45aa
Created November 23, 2015 06:46
error when replacement of image
E, [2015-11-23T14:55:30.617479 #43881] ERROR -- : exception while processing events: articles/2015-11/23-bourbon-neat-how-to-make-visual-grid-responsive/images/screenshot.png should be in the sitemap! Backtrace:
-- /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-core-3.4.0/lib/middleman-more/extensions/asset_hash.rb:48:in `manipulate_single_resource'
-- /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-core-3.4.0/lib/middleman-more/extensions/asset_hash.rb:38:in `each'
-- /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-core-3.4.0/lib/middleman-more/extensions/asset_hash.rb:38:in `manipulate_resource_list'
-- /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-core-3.4.0/lib/middleman-core/sitemap/store.rb:215:in `block (2 levels) in ensure_resource_list_updated!'
-- /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-core-3.4.0/lib/middleman-core/sitemap/store.rb:214:in `each'
-- /Users/hoge/.rbenv/versions/2.
@tarky
tarky / gist:10b4ab7e034a27ba1daf
Created November 22, 2015 11:00
middlema build error
/Users/hoge/blog/webfood/source/stylesheets/layout/main.scss:7:in `outer-container': Undefined mixin 'outer-container'. (Sass::SyntaxError)
(in /Users/hoge/blog/webfood/source/stylesheets/layout/main.scss:7)
from /Users/hoge/blog/webfood/source/stylesheets/layout/main.scss:7
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/sass-3.4.19/lib/sass/tree/visitors/perform.rb:349:in `block in visit_mixin'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/sass-3.4.19/lib/sass/stack.rb:98:in `block in with_mixin'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/sass-3.4.19/lib/sass/stack.rb:115:in `with_frame'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/sass-3.4.19/lib/sass/stack.rb:98:in `with_mixin'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/sass-3.4.19/lib/sass/tree/visitors/perform.rb:347:in `visit_mixin'
from /Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/sass-3.4.19/lib/sass/tree/visitors/base.rb:36:in `visit
@tarky
tarky / gist:a93f77110866f5c3fd06
Created November 21, 2015 04:24
err code block in erb error
RuntimeError: Tried to render a layout (calls yield) at /Users/araky/blog/webfood/source/articles/2015-11/middleman-wrap-layout-doesnt-work-as-the-doc/index.html.md.erb like it was a template. Non-default layouts need to be in source/layouts.
/Users/araky/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-core-3.4.0/lib/middleman-core/core_extensions/rendering.rb:186:in `rescue in _render_with_all_renderers'
/Users/araky/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-core-3.4.0/lib/middleman-core/core_extensions/rendering.rb:175:in `_render_with_all_renderers'
/Users/araky/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-core-3.4.0/lib/middleman-core/core_extensions/rendering.rb:149:in `render_template'
/Users/araky/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-core-3.4.0/lib/middleman-core/sitemap/resource.rb:127:in `block in render'
/Users/araky/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.2.4/lib/active_support/notifications.rb:166:in `instrument'
@tarky
tarky / gist:f9ddd436f24bec026848
Created November 18, 2015 07:00
"middleman server" error
Error reloading Middleman: undefined method `deploy_method=' for #<Middleman::Deploy::Options:0x007fe8542a9358>
/Users/hoge/blog/webfood/config.rb:125:in `block in initialize'
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-deploy-1.0.0/lib/middleman-deploy/extension.rb:16:in `registered'
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-core-3.4.0/lib/middleman-core/core_extensions/extensions.rb:80:in `register'
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-core-3.4.0/lib/middleman-core/core_extensions/extensions.rb:112:in `activate'
/Users/hoge/blog/webfood/config.rb:124:in `initialize'
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-core-3.4.0/lib/middleman-core/core_extensions/extensions.rb:162:in `instance_eval'
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-core-3.4.0/lib/middleman-core/core_extensions/extensions.rb:162:in `initialize'
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middl
@tarky
tarky / gist:b3a77ecd8098bc78c18e
Created November 18, 2015 06:51
`middleman deploy` error
ERROR: You need to activate the deploy extension in config.rb.
You should follow one of the four examples below to setup the deploy
extension in config.rb.
# To deploy the build directory to a remote host via rsync:
activate :deploy do |deploy|
deploy.method = :rsync
# host and path *must* be set
deploy.host = "www.example.com"
@tarky
tarky / gist:1d5eec4ba9169b0175b9
Created November 18, 2015 06:33
wrap_layout error
SyntaxError: /Users/hoge/blog/webfood/source/layouts/article.html.erb:1: syntax error, unexpected ')'
@_out_buf << ( wrap_layout :layout do ).to_s; @_out_buf << '
^
/Users/hoge/blog/webfood/source/layouts/article.html.erb:9: syntax error, unexpected keyword_ensure, expecting ')'
/Users/hoge/blog/webfood/source/layouts/article.html.erb:11: syntax error, unexpected keyword_end, expecting ')'
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/tilt-1.4.1/lib/tilt/template.rb:264:in `class_eval'
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/tilt-1.4.1/lib/tilt/template.rb:264:in `compile_template_method'
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/tilt-1.4.1/lib/tilt/template.rb:240:in `compiled_method'
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/tilt-1.4.1/lib/tilt/template.rb:169:in `evaluate'
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
@tarky
tarky / gist:d8024acb62cfb92f9442
Created November 18, 2015 05:27
"middleman build --verbose" error
error build/2015/index.html
undefined local variable or method `month' for #<Middleman::Application:0x70289256449720>
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/middleman-core-3.4.0/lib/middleman-core/configuration.rb:78:in `method_missing'
/Users/hoge/blog/webfood/source/calendar.slim:1:in `block in singleton class'
/Users/hoge/blog/webfood/source/calendar.slim:-17:in `instance_eval'
/Users/hoge/blog/webfood/source/calendar.slim:-17:in `singleton class'
/Users/hoge/blog/webfood/source/calendar.slim:-19:in `__tilt_70289245756400'
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/tilt-1.4.1/lib/tilt/template.rb:170:in `call'
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/tilt-1.4.1/lib/tilt/template.rb:170:in `evaluate'
/Users/hoge/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'