2017-01-01から1年間の記事一覧
h = 'Hoge'.constantize h.create(fuga: 'fuga') した時に active_support/inflector/methods.rb:268:in `const_get': uninitialized constant Hoge (NameError) とHogeという定数、クラスがなかったため怒られてしまった。 safe_constantizeで回避 safe_con…
task :test do puts 'hoge' return puts 'moge' end 実行する rake aborted! LocalJumpError: unexpected return 怒られた… rake taskの中断はreturnじゃなくてnextとのこと task :test do puts 'hoge' next puts 'moge' end 以下の場合はreturnとのこと tas…
brew update brew update したら $ brew update /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr…
GoogleMapAPIを使って現在地情報を取得しようとしたところ Chromeで getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HT…