【Rails】Problem loading '.overcommit_gems.rb' エラー 【解決済】
vscodeのソース管理機能を使って、Gitコミットしようと思ったら、以下のようなエラーがでた。
Problem loading '.overcommit_gems.rb': Could not find parallel-1.11.2 in any of the sources
試しに、同じようにターミナルでコミットしてみたら、以下のようにエラーメッセージで解決策を指摘してくれた。
Problem loading '.overcommit_gems.rb': Could not find parallel-1.11.2 in any of the sources Try running: bundle install --gemfile=.overcommit_gems.rb
エラーメッセージの通り、
$ bundle install --gemfile=.overcommit_gems.rb
で解決した。やったね。
$ bundle install --gemfile=.overcommit_gems.rb Fetching gem metadata from https://rubygems.org/........... Using rake 12.0.0 Using ast 2.3.0 Using bundler 1.16.1 Using ffi 1.9.18 Using childprocess 0.6.3 Using iniparse 1.4.3 Using overcommit 0.39.1 Fetching parallel 1.11.2 Installing parallel 1.11.2 Using parser 2.4.0.0 Using powerpack 0.1.1 Using rainbow 2.2.2 Using ruby-progressbar 1.8.1 Using unicode-display_width 1.2.1 Fetching rubocop 0.49.1 Installing rubocop 0.49.1 Using sass 3.4.24 Fetching scss_lint 0.53.0 Installing scss_lint 0.53.0 Bundle complete! 4 Gemfile dependencies, 16 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed.
Zettajs はnodeのバージョンが9だと動かない
Hello World Zetta
を試していたところ、以下のようなエラーでコケた。
util.js:948 throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'superCtor', 'Function'); ^ TypeError [ERR_INVALID_ARG_TYPE]: The "superCtor" argument must be of type Function at Object.inherits (util.js:948:11) at Object.<anonymous> (/Users/moyz/Test/zettajs-test/node_modules/spdy/lib/spdy/connection.js:86:6) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:573:32) at tryModuleLoad (module.js:513:12) at Function.Module._load (module.js:505:3) at Module.require (module.js:604:17) at require (internal/module.js:11:18) at Object.<anonymous> (/Users/mozy/Test/zettajs-test/node_modules/spdy/lib/spdy.js:20:19)
あーコレはnodeのバージョンの問題だなと思ったので
nodebrew list
でインストールしているnodeのバージョンを確認した。
今回は、 運よくv6.11.0がインストールしてあったのでこちらを使用した。
direnvを使ってディレクトリごとに環境を変えているので、今回も、
direnv edit .
で.envrc
ファイル内に
PATH_add ~/.nodebrew/node/v6.11.0/bin
と記載して解決。
動作確認
$ node server.js (node:6554) DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead. Mar-21-2018 12:47:23 [server] Server (mozy) mozy listening on http://127.0.0.1:1337 Zetta is running at http://127.0.0.1:1337
$curl http://127.0.0.1:1337 {"class":["root"],"links":[{"rel":["self"],"href":"http://127.0.0.1:1337/"},{"title":"mozy","rel":["http://rels.zettajs.io/server"],"href":"http://127.0.0.1:1337/servers/mozy"},{"rel":["http://rels.zettajs.io/events"],"href":"ws://127.0.0.1:1337/events"},{"rel":["http://rels.zettajs.io/peer-management"],"href":"http://127.0.0.1:1337/peer-management"}],"actions":[{"name":"query-devices","method":"GET","href":"http://127.0.0.1:1337/","type":"application/x-www-form-urlencoded","fields":[{"name":"server","type":"text"},{"name":"ql","type":"text"}]}]}%
いい感じ。実験完了。動いてよかった。❤︎
【解決済み】React Nativeで、run-androidしたときにNo connected devices って怒られる
React Nativeでandroidアプリをrunしようとしたら、
以下のようなエラーが出て止まった。
* What went wrong: Execution failed for task ':app:installDebug'. > com.android.builder.testing.api.DeviceException: No connected devices!
以下のページを参考にして、あらかじめエミュレータを起動しておいてから
実行したらうまく動作した。
Failed run android simulator : No connected devices! · Issue #3091 · facebook/react-native · GitHub
Ionicを使ってWeb、iOS共通コードでアプリを作る
Ionicで作る モバイルアプリ制作入門〈Web/iPhone/Android対応〉
- 作者: 榊原昌彦
- 出版社/メーカー: シーアンドアール研究所
- 発売日: 2018/01/19
- メディア: 単行本(ソフトカバー)
- この商品を含むブログを見る
Twitterで回ってきた、この本が面白そうだったので、kindle版を買って試している。
気軽にWebアプリが作れるのでなかなかにびっくりしている。
書籍内で、Ionicを使用して作られたiOSアプリなども挙げられていて、触ってみると十分かなと感じたため、学習を開始。
今日はインストールとサンプルを動かす程度かなぁ。
今後
以下にやったこと、疑問、進捗などをまとめていく https://github.com/MozyOk/ionic_tutorial
【未解決】Github Desktop Windows を開こうとしたら、javascript エラー
Github Desktopを開こうとしたら以下の画像のようなエラーがでた。
言及しているページ
Github desktop is not opening · Issue #1638 · desktop/desktop · GitHub
解決方法
今のところ、再インストールしかないっぽい??