こんがりぃ

都内在住フリーランスのエンジニア。主にRuby on Rails。Twitter(@Kongari_Bug)で格ゲー。

2018-01-01から1年間の記事一覧

Googleマイマップの更新情報をSlackに通知する

やりたいこと Googleマイマップにラーメン屋の感想を入力し、Slackに内容を通知して共有したい 調べた限り、マイマップには更新を検知するためのwebhook設定などはない。 今回はGoogle Apps Script, Fusion Tablesを利用して実現する。 ※Fusion Tablesは2019…

RubyのClass#inheritedの実行タイミングはクラス定義文の実行直前

サブクラスを呼び出したかったがそうはならない。 class A def self.inherited(child) p child child.aaa B.aaa aaa end def self.aaa p "A" end end class B < A def self.aaa p "B" end end p "#" * 40 B.aaa 実行結果 B "A" "A" "A" "###################…

mount_smbfs: server rejected the connection: Authentication error

mount_smbfs: server rejected the connection: Authentication error が出る場合、sambaのパスワードを設定しなせばいけた。 sudo su smbpasswd -a ユーザ名 参考リンク www.ksknet.net

yarn install 中の node-sass エラー

make: *** [Release/obj.target/binding/src/binding.o] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/vagrant/rails/yuyuyui/node_modules/node-gyp/lib/build.js:2…

rails/webpackerを使ってRailsで定義した定数をTypeScript(JavaScript)内で使う

環境 Rails5.1.4 rails/webpacker 3.2.1 公式のdocumentにあるerb-loaderを利用する。 https://github.com/rails/webpacker#erb ubuntu@ubuntu-xenial:~/rails/yuyuyui$ bundle exec rails webpacker:install:erb rails aborted! Don't know how to build ta…