質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

解決済

1回答

9608閲覧

railsチュートリアル中、bundle install でインストールできない

scrollman

総合スコア83

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2017/12/16 10:22

railsチュートリアルで勉強していたのですが、

bundle install を実行すと

The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for r uby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bund le lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. There was an error while trying to write to `/home/syuumu200/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions`. It is likely that you need to grant write permissions for that path.

と表示され、

bundle update と入力しても

The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for r uby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bund le lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. There was an error while trying to write to `/home/syuumu200/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions`. It is likely that you need to grant write permissions for that path.

と表示されます、、。

Gemfile の中身はこんな感じです

Gemfileの中身

1source 'https://rubygems.org' 2 3git_source(:github) do |repo_name| 4 repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") 5 "https://github.com/#{repo_name}.git" 6end 7 8# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 9gem 'rails', '~> 5.1.2' 10# Use sqlite3 as the database for Active Record 11gem 'sqlite3', '>= 3.11.0' 12# Use Puma as the app server 13gem 'puma', '~> 3.0' 14# Use SCSS for stylesheets 15gem 'sass-rails', '~> 5.0' 16# Use Uglifier as compressor for JavaScript assets 17gem 'uglifier', '>= 1.3.0' 18# Use CoffeeScript for .coffee assets and views 19gem 'coffee-rails', '~> 4.2' 20# See https://github.com/rails/execjs#readme 21# for more supported runtimes 22# gem 'therubyracer', platforms: :ruby 23 24# Use jquery as the JavaScript library 25gem 'jquery-rails' 26# Turbolinks makes navigating your web application faster. 27# Read more: https://github.com/turbolinks/turbolinks 28gem 'turbolinks', '~> 5.x' 29# Build JSON APIs with ease. 30# Read more: https://github.com/rails/jbuilder 31gem 'jbuilder', '~> 2.0' 32# Use Redis adapter to run Action Cable in production 33# gem 'redis', '~> 3.0' 34# Use ActiveModel has_secure_password 35# gem 'bcrypt', '~> 3.1.7' 36 37# Use Capistrano for deployment 38# gem 'capistrano-rails', group: :development 39 40group :development, :test do 41 # Call 'byebug' anywhere in the code to stop execution 42 # and get a debugger console 43 gem 'byebug', platform: :mri 44end 45 46group :development do 47 # Access an IRB console on exception pages or by using 48 # <%= console %> anywhere in the code. 49 gem 'web-console' 50 gem 'listen', '~> 3.0.5' 51 # Spring speeds up development by keeping your application running 52 # in the background. Read more: https://github.com/rails/spring 53 gem 'spring' 54 gem 'spring-watcher-listen', '~> 2.0.0' 55end 56 57# Windows環境ではtzinfo-dataというgemを含める必要があります 58gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 59

どうすれば rails server でローカルサイトを展開できるようになるでしょうか

何卒御教授お願い致します

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

githubにissueが切られていました。
https://github.com/tzinfo/tzinfo-data/issues/12

google先生に翻訳をしてもらうと、以下のいづれかの解決方法がありそうです

  • Gemfileのgem 'tzinfo-data'行からplatformsオプションを削除し(そして、バンドル更新を実行してください)。 これにより、tzinfoは、システムのタイムゾーンデータを使用する代わりに、すべてのプラットフォームでtzinfo-dataをそのデータソースとして使用します。
  • gemfileからgem 'tzinfo-data'行を削除します。 これにより、tzinfoは常にシステムタイムゾーンデータを試して使用します。 Windowsでアプリケーションを実行しようとすると、TZInfo :: DataSourceNotFound例外が発生します。
  • Bundlerがバンドルに含めるプラットフォームのリストにmingw、mswin、x64_mingw、およびjrubyを追加するには、bundle lock --add-platform mingw, mswin, x64_mingw, jruby を実行します。

1つ目か3つ目を試してみてはいかがでしょうか?

投稿2017/12/31 19:19

satoshih

総合スコア797

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問