●前提条件
windows10
Start Command Pronpt with Ruby
toy_app作成済み
※toy_appに関して
rails tutorial第二章においてrails -v5.1.6が使用されていたが
自分はrails -v5.2.3でtoy_appを作成しました。
●試したこと
toy_app内のGem fileを下に書き換える。
Toyアプリケーション用のGemfile
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.7.0'
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
group :production do
gem 'pg', '0.20.0'
end
Windows環境ではtzinfo-dataというgemを含める必要があります
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
書き換えた後に
"C:\Users\Username\environment\toy_app\vender\bundle\gems"
内にあるgemのversionを書き換えました。
書き換え後
source 'https://rubygems.org'
gem 'rails', '5.2.3'
gem 'puma', '3.12.1'
gem 'sass-rails', '5.1.0'
gem 'uglifier', '4.2.0'
gem 'coffee-rails', '4.2.2'
gem 'jquery-rails', '4.3.5'
gem 'turbolinks', '5.2.1'
gem 'jbuilder', '2.9.1'
group :development, :test do
gem 'sqlite3', '1.4.1'
gem 'byebug', '11.0.1', platform: :mri
end
group :development do
gem 'web-console', '3.7.0'
gem 'listen', '3.1.5'
gem 'spring', '2.0.2'
gem 'spring-watcher-listen', '2.0.1'
end
group :production do
gem 'pg', '0.20.0'
end
Windows環境ではtzinfo-dataというgemを含める必要があります
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
次に
bundle install --without production
bundle update
を実行
●解決したいこと
toy_appでrails sを正常に立ち上げる
●発生している問題、エラーメッセージ
Could not find gem 'jquery-rails (= 4.3.5) x64-mingw32' in any of the gem sources listed in your Gemfile.
Run bundle install
to install missing gems.
●追加で試したこと
①、Could not find gem 'jquery-rails (= 4.3.5) x64-mingw32
でjquery-rails (= 4.3.5)がリスト内にないとのことなので
"C:\Users\Username\environment\toy_app\vender\bundle\gems"
にStart Command Pronpt with Rubyでパスに移動して
gem install jquery-rails
を実行。
Successfully installed jquery-rails-4.3.5
Parsing documentation for jquery-rails-4.3.5
Done installing documentation for jquery-rails after 0 seconds
1 gem installed
しかし、
rails s
同じエラーメッセージ
Could not find gem 'jquery-rails (= 4.3.5) x64-mingw32' in any of the gem sources listed in your Gemfile.
Run bundle install
to install missing gems.
②、https://rubygems.orgで直接gemをダウンロードして
C:\Users\Username\environment\toy_app\vender\bundle\gems"に移動させ
'jquery-rails (= 4.3.5) x64-mingw32'というフォルダを作りその中に保存
rails s 実行
同じエラーメッセージ
Could not find gem 'jquery-rails (= 4.3.5) x64-mingw32' in any of the gem sources listed in your Gemfile.
Run bundle install
to install missing gems.
③、https://carefree-se.hatenablog.com/entry/2015/07/22/125904
こちらに書かれていて該当していることはすべて試しましたが同じエラーメッセージでした
あなたの回答
tips
プレビュー