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

remoteConfig.fetchWithExpirationDuration の callback の呼び出しタイミングがとても遅い件

FirebaseのremoteConfigを試してたのですが、以下の ...のcallbackが呼ばれるのがとっても遅い。 remoteConfig.fetchWithExpirationDuration(NSTimeInterval(1)) {...} controllerの処理が終わったらcallbackが動き出す感じ。なんでだろう。 理想は func app…

dispatch_semaphore_createを使った別スレッドの処理を待つ書き方

同期処理というのかな?並列処理とか苦手だなぁ。 print("hoge-1") let semaphore = dispatch_semaphore_create(0) print("hoge-2") let queue = dispatch_get_main_queue() print("hoge-3") dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIOR…

bundle install 時に使われるrubyのバージョンがおかしい

gem list ここに bundler がない場合におかしくなる様子 なので gem install bundler を行い、 rbenv rehash してから再度 bundle install --path vendor/bundle するといい感じになる

Sierraで rails c すると「uninitialized constant Mysql2::Client::SECURE_CONNECTION (NameError)」

新しいPC(Sierra)で既存Railsアプリケーションを構築中に rails c したら以下のようなエラーがでる uninitialized constant Mysql2::Client::SECURE_CONNECTION (NameError) mysqlがインストールされていないと思って brew install mysql して直るだろうと思…

bundle install したら eventmachine でエラーが起こる

bundle install --path vendor/bundle したときに以下のエラーで困った時 An error occurred while installing eventmachine (1.0.3), and Bundler cannot continue. Make sure that `gem install eventmachine -v '1.0.3'` succeeds before bundling. 以下…