前提・実現したいこと
初めて質問をさせて頂きます。
ruby初心者でrails tutorialを始めた者です。
環境はAWSのCloud9になります。
rails serverコマンドでアプリを起動しようとしたところ
以下のようなエラーが起きて進まなくなってしまいました。
発生したエラー①
Could not find gem 'puma (= 3.9.1)' in any of the gem sources listed in your Gemfile.
対処したこと
その後gem 'puma (= 3.9.1)'をインストールするべく下記の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
.
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "activesupport":
In snapshot (Gemfile.lock):
activesupport (= 5.1.6.1)
In Gemfile:
rails (= 5.1.6) was resolved to 5.1.6, which depends on
activesupport (= 5.1.6)
coffee-rails (= 4.2.2) was resolved to 4.2.2, which depends on railties (>= 4.0.0) was resolved to 5.1.6.1, which depends on activesupport (= 5.1.6.1)
Running bundle update
will rebuild your snapshot from scratch, using
only
the gems in your Gemfile, which may resolve the conflict.
gemファイルのソースコード
source 'https://rubygems.org'
gem 'rails', '5.1.6'
gem 'puma', '3.9.1'
gem 'sass-rails', '5.0.6'
gem 'uglifier', '3.2.0'
gem 'coffee-rails', '4.2.2'
gem 'jquery-rails', '4.3.1'
gem 'turbolinks', '5.0.1'
gem 'jbuilder', '2.6.4'
group :development, :test do
gem 'sqlite3', '1.3.13'
gem 'byebug', '9.0.6', platform: :mri
end
group :development do
gem 'web-console', '3.5.1'
gem 'listen', '3.1.5'
gem 'spring', '2.0.2'
gem 'spring-watcher-listen', '2.0.1'
end
Windows環境ではtzinfo-dataというgemを含める必要があります
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
どなたかアドバイスをよろしくお願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。