うちのいぬ Tech Blog

Tech Blog of Uchinoinu/My dog

2016-07-01から1ヶ月間の記事一覧

In Wercker, error "Bundler failing with index file .idx too small error" is show up

Situation Using Wercker for Building and Deploying Rails 4.x application. The Wercker version is Docker. In the build step, Bundler failing with index file .idx too small error error above is occurred so many times. and in the end, Retry e…

Werckerで "Bundler failing with index file .idx too small error" といったエラーが出た場合の対処

状況 普段Rails4系のアプリでWerckerをCIとして使っています。 WerckerはDocker版を使用しています。 そのBuild Stepで Bundler failing with index file .idx too small error といったエラーがたくさんでて、結果的に Retry exceeds max retries といった…

Git command for Deploy or PR merging

Diff of changed files $ git diff --stat commit-new commit-old $ git diff --stat --name-only commit-new commit-old $ git diff --stat --ignore-blank-lines commit-new commit-old Diff of content of file $ git diff commit-old commit-new -- path…

デプロイ前のログや差分をチェックするgitコマンド

変更したfileの抽出 $ git diff --stat commit-new commit-old $ git diff --stat --name-only commit-new commit-old $ git diff --stat --ignore-blank-lines commit-new commit-old fileの変更差分 $ git diff commit-old commit-new -- path/to/file 差…

Links of Restful API(JSON) References

Japanese Here uchinoinu.hatenablog.jp Guideline github.com github.com Platform developer.yahoo.co.jp RESTful Web サービスの基本 Articles qiita.com www.toptal.com 10 Best Practices for Better RESTful API | Thinking Mobile Presentation www.i…

Restful API(JSON)の参考まとめ

Japanese here uchinoinu.hatenablog.jp Guideline github.com github.com Platform developer.yahoo.co.jp RESTful Web サービスの基本 Articles qiita.com www.toptal.com 10 Best Practices for Better RESTful API | Thinking Mobile Presentation www.i…

How to set initial selected tab

Japanese here uchinoinu.hatenablog.jp func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { let tabBar = self.window!.rootViewController as! UITabBarController tabBar.se…

最初に選択されるTabを指定する方法

English here uchinoinu.hatenablog.jp func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { let tabBar = self.window!.rootViewController as! UITabBarController tabBar.sel…

rails c(bin/rails c) cannot load env vars managed by direnv

Japanese here uchinoinu.hatenablog.jp Situation Rails 4.2 Ruby 2.3 Spring 1.3.5 direnv 2.8.1 Manage environment variables by direnv run rails command using Spring Problem Adding new environment variables, rails c cannot load any environmen…

direnvで環境変数を管理していて、springへのpathも貼っている場合、環境変数を編集すると、rails cとかで環境変数が読み込めなくなるエラーへの対応

English here uchinoinu.hatenablog.jp 状況 Rails 4.2 Ruby 2.3 Spring 1.3.5 direnv 2.8.1 direnvで環境変数を管理している Springを使ってrailsコマンドを動かしている 問題 環境変数を追加したら、rails sは通るけど、rails cでは環境変数を読み込めなく…

How to embed css(sass) in Slim file

Japanese here. uchinoinu.hatenablog.jp sass: img width: 100% Write like above, <style type="text/css"> img { width: 100%; } </style> Output html like above. Reference マークアッパー的 Slim 入門21の手引き | e2esound.com業務日誌

Slimファイル内に css(sass)を埋め込む方法

English here uchinoinu.hatenablog.jp 簡単でした sass: img width: 100% と書くと <style type="text/css"> img { width: 100%; } </style> と出力されます。 Reference マークアッパー的 Slim 入門21の手引き | e2esound.com業務日誌

Show title to NavigationBar by Coding

Japanese here uchinoinu.hatenablog.jp Standard Way Set title property in NavigationItem of NavigationController self.navigationItem.title = "title" Popular Failure self.navigationController.title = "title" Rapid Way Set title property of U…

NavigationBarにtitleをコードで表示させる方法

English Here. uchinoinu.hatenablog.jp ちゃんとした方法 NavigationControllerのNavigationItemのtitleプロパティに設定する self.navigationItem.title = "title" よくある間違い self.navigationController.title = "title" 手っ取り早い方法 selfがUIVi…

How to handle Error: IBOutlet is nil in ViewController transited by code not by Segue.

Japanese version is here uchinoinu.hatenablog.jp Env Xcode 8.0 bata Swift 3 Situation Make UI using Storyboard Using IBOutlet Transition by Code Problem 遷移先でIBOutletさんがnilになります Reason I did wrong way to call ViewController to t…

Segueを使わず、コードで遷移した先のViewControllerでIBOutletがnilになるよってエラーが出る際の対応

English is here. uchinoinu.hatenablog.jp 環境 Xcode 8.0 bata Swift 3 状況 StoryboardでUIをつくちゃっている IBOutletを使っている せめて遷移にはSegueではなくコードを使う 問題点 遷移先でIBOutletさんがnilになります 原因 Segueを使わないので、遷…

How to handle Error: IBOutlet is nil in ViewController transited by code not by Segue.

Japanese version is here uchinoinu.hatenablog.jp Env Xcode 8.0 bata Swift 3 Principle to develop Make UI using Storyboard Using IBOutlet Transition by Code Problem 遷移先でIBOutletさんがnilになります Reason I did wrong way to call ViewCont…

Segueを使わず、コードで遷移した先のViewControllerでIBOutletがnilになるよってエラーが出る際の対応

状況 環境 Xcode 8.0 bata Swift 3 方針 StoryboardでUIをつくちゃっている IBOutletを使っている せめて遷移にはSegueではなくコードを使う 問題点 遷移先でIBOutletさんがnilになります 原因 Segueを使わないので、遷移にはコードを使っていました。 遷移…

Localization of iOS App - including Storyboard and plist

Japanese is here uchinoinu.hatenablog.jp I watched this view often. Now make the manual to localiztion Flow This time, I made localization env like below. - Base is English - add Japanese. 1. Generate Localizable.strings 2. Set up show fil…

アプリをローカライズ(国際化)する・Storyboardやplistも含め、複数言語を設定する

English is here uchinoinu.hatenablog.jp Webアプリではやったことあっても、iOSではなかったのですが、 ↓はよく目にしていました。 ちゃんと手順をおってみます。 手順 1. Localizable.stringsを作成 2. Localizeの設定 出来たファイルをinspector表示しま…

How to handle warning of Deleted File “file xxx is missing from working copy” at project building

Related to uchinoinu.hatenablog.jp Warning “file xxx is missing from working copy” at project building How This time, warning against to deleted file. Maybe cache of git is problem. $ git rm -r --cached .

存在しないファイル “file xxx is missing from working copy” at project building というWarningへの対応

↓と関連してます uchinoinu.hatenablog.jp Warning(警告) “file xxx is missing from working copy” at project building 対応 実際に存在しないファイルについてこういう警告がでたときは、Gitのcacheを消したらうまくいきました。 $ git rm -r --cached .

How to remove Warning "The Copy Bundle Resources build phase contains this target's Info.plist file 'Info.plist"

Warning The Copy Bundle Resources build phase contains this target's Info.plist file 'Info.plist'. Dealing Remove Info.plist from Copy Bundle Resources in Build Phase Reference Technical Q&A QA1649: WARNING: The Copy Bundle Resources build…

2016年上半期の振り返り

概要 2016年も半年が過ぎて、早7/3。 本当は毎日、毎週、毎月ちゃんと振り返りたかったけど、 まずは今日から始めたいと思います。 簡単なまとめ 心の成長?復活?が出来ました 好きなことを思い出して、またやれるようになった 自分の性質について少し理解で…

うちのいぬ - うみちゃんと話せるbotを作りました 4 - とりあえずまとめ

これまでに書いたもの http://satomi.hatenablog.jp/entry/2016/06/26/104827satomi.hatenablog.jp http://satomi.hatenablog.jp/entry/2016/06/26/093734satomi.hatenablog.jp http://satomi.hatenablog.jp/entry/2016/06/25/213801satomi.hatenablog.jp 作…

うちのいぬ - うみちゃんと話せるbotを作りました 3 - LINE bot を Heroku と Rails を使って作ってみた

これまでFacebook botを作った経緯や作り方を書きました。 http://satomi.hatenablog.jp/entry/2016/06/26/093734satomi.hatenablog.jp http://satomi.hatenablog.jp/entry/2016/06/25/213801satomi.hatenablog.jp 今回は LINE bot の作り方を書きます https…

うちのいぬ - うみちゃんと話せるbotを作りました 2 - Facebook bot を Heroku と Rails を使って作ってみた

前回、概要と昨日までの成果物を書きました↓ http://satomi.hatenablog.jp/entry/2016/06/25/213801satomi.hatenablog.jp 今回はFacebook botをどう作ったか書きます。 環境 Heroku Ralis 4.2 Ruby 2.2 Uchinoinu - MyDogはbotだけじゃなくウェブサービスも…

うちのいぬ - うみちゃんと話せるbotを作りました 1

Uchinoinu - MyDog はこれまでTwitterでのうみちゃんの可愛いツイート垂れ流しbotしかサービスを持っていませんでしたが、 Facebookでうみちゃんと話せる機能が実装されました! とはいえ、まだオウム返しですがc(`Д´と⌒c)つ彡 実は、隠し機能としてtwitter…

The Copy Bundle Resources build phase contains this target's Info.plist file 'Info.plist'. のWarningのエラーが出た時の対処法

こんなWarning(警告)がでました The Copy Bundle Resources build phase contains this target's Info.plist file 'Info.plist'. 対応はこんな感じ build phase の Copy Bundle Resources から Info.plistを削除 参考 Technical Q&A QA1649: WARNING: The Co…