rails newでエラー発生??

先日、rails newでアプリを作ろうと思っていたら、エラーが発生!!

The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock –add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.

 

コマンド処理が一時停止。

ウンともスンとも言わなくなったのです。

 

「たった1行でエラーが出るとは・・・・もはや才能」

 

初歩中の初歩で躓いて落ち込んでいました。

何はともあれ、神を信じて、一旦待つことに。

歯を磨いて戻ってみたところ・・・・・まだ処理が止まっていました。

 

困ったのでググってみても、同じ症状で苦しんでいるプレイヤーはいません。

同志を発見できず、柱を殴りそうになり、叫ぼうと声帯を震わせ始めたそのとき、です。

なぜか処理が再開し始めたのです。

Fetching gem metadata from https://rubygems.org/…………
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies….

が出て、

そこからすんなり処理が進行。

ちゃんとRailsアプリを作成できました。

Bundle complete! 18 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
run bundle exec spring binstub –all
* bin/rake: Spring inserted
* bin/rails: Spring inserted

この文が出て、ようやくアプリが作成されたのです。

 

 

一体何だったんでしょうかね?

僕の怒りがターミナルに通じたのかもしれません。

とりあえず、無事にエラーを解決できました。

そうです。

鍵は「待つこと」だったのですね。

 

待たないとどうなるのか?

「一発で解決したよう」に装っていますが、実は、一度、我慢できませんでした。

The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock –add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.

が出た時に、あろうことか

control + C

で処理を中断。

 

すでに、Railsアプリのファイルが生成されていたので、何事も無かったかのようにアプリを作り始めました。

がしかし、です。

Gemfileを編集し、

$ bundle install

を発動すると、再び同じエラーが発生!!

The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock –add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.

く、クソが!

 

Railsアプリを作っていると、gemを追加して$ bundle installという作業は必須。

どうしても避けられないので、最初で誤魔化すと、のちのち不具合が出ます。

The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock –add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.

がでても、朗らかに待ちましょう。

歯を磨くなり、風呂に入るなりして、じっくり待つしかないのです。

 

それでは!

Lin