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

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

新規登録して質問してみよう
ただいま回答率
85.48%
Windows 10

Windows 10は、マイクロソフト社がリリースしたOSです。Modern UIを標準画面にした8.1から、10では再びデスクトップ主体に戻され、UIも変更されています。PCやスマホ、タブレットなど様々なデバイスに幅広く対応していることが特徴です。

Ruby

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

Ruby on Rails

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

Q&A

解決済

2回答

1479閲覧

Ruby , Ruby on rails のWindows10環境開発について

Magiii

総合スコア6

Windows 10

Windows 10は、マイクロソフト社がリリースしたOSです。Modern UIを標準画面にした8.1から、10では再びデスクトップ主体に戻され、UIも変更されています。PCやスマホ、タブレットなど様々なデバイスに幅広く対応していることが特徴です。

Ruby

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

Ruby on Rails

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

0グッド

0クリップ

投稿2020/01/23 17:37

コマンドプロンプトにおいてrails sと打ち込むと

Could not find gem 'sqlite3 x64-mingw32' in any of the gem sources listed in your Gemfile. Run `bundle install` to install missing gems.

と出ます。
Ruby2.6.5
Ruby on rails 5.2.4.1
参考サイトはプロゲートのWindowsのRuby on railsの環境開発です。
気になる点としてはsqlite3のversionがおそらく32bitで自分のパソコンが64bitです(確認方法がわかりません)

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

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

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

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

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

otn

2020/01/24 00:06

bundle installの結果はどうなんですか?
Magiii

2020/01/24 02:57

bundle installを行うと Fetching gem metadata from https://rubygems.org/............. Fetching gem metadata from https://rubygems.org/. Resolving dependencies.... Using rake 13.0.1 Using concurrent-ruby 1.1.5 Using i18n 1.8.2 Using minitest 5.14.0 Using thread_safe 0.3.6 Using tzinfo 1.2.6 Using activesupport 5.2.4.1 Using builder 3.2.4 Using erubi 1.9.0 Using mini_portile2 2.4.0 Using nokogiri 1.10.7 (x64-mingw32) Using rails-dom-testing 2.0.3 Using crass 1.0.6 Using loofah 2.4.0 Using rails-html-sanitizer 1.3.0 Using actionview 5.2.4.1 Using rack 2.1.1 Using rack-test 1.1.0 Using actionpack 5.2.4.1 Using nio4r 2.5.2 Using websocket-extensions 0.1.4 Using websocket-driver 0.7.1 Using actioncable 5.2.4.1 Using globalid 0.4.2 Using activejob 5.2.4.1 Using mini_mime 1.0.2 Using mail 2.7.1 Using actionmailer 5.2.4.1 Using activemodel 5.2.4.1 Using arel 9.0.0 Using activerecord 5.2.4.1 Using mimemagic 0.3.3 Using marcel 0.3.3 Using activestorage 5.2.4.1 Using public_suffix 4.0.3 Using addressable 2.7.0 Using io-like 0.3.0 Using archive-zip 0.12.0 Using bindex 0.8.1 Using msgpack 1.3.1 (x64-mingw32) Using bootsnap 1.4.5 Using bundler 2.1.4 Fetching byebug 11.1.1 Installing byebug 11.1.1 with native extensions Using regexp_parser 1.6.0 Using xpath 3.2.0 Using capybara 3.30.0 Using childprocess 3.0.0 Using chromedriver-helper 2.1.1 Using coffee-script-source 1.12.2 Using execjs 2.7.0 Using coffee-script 2.4.1 Using method_source 0.9.2 Using thor 1.0.1 Using railties 5.2.4.1 Using coffee-rails 4.2.2 Using duktape 2.3.0.0 Using ffi 1.12.1 (x64-mingw32) Using jbuilder 2.9.1 Using puma 3.12.2 Using sprockets 3.7.2 Using sprockets-rails 3.2.1 Using rails 5.2.4.1 Using rb-fsevent 0.10.3 Using rb-inotify 0.10.1 Using rubyzip 2.0.0 Using sass-listen 4.0.0 Using sass 3.7.4 Using tilt 2.0.10 Using sass-rails 5.1.0 Using selenium-webdriver 3.142.7 Fetching sqlite3 1.4.2 Installing sqlite3 1.4.2 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.2/ext/sqlite3 C:/Ruby26-x64/bin/ruby.exe -I C:/Ruby26-x64/lib/ruby/2.6.0 -r ./siteconf20200124-21748-t3soya.rb extconf.rb checking for sqlite3.h... *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=C:/Ruby26-x64/bin/$(RUBY_BASE_NAME) --with-sqlcipher --without-sqlcipher --with-sqlite3-config --without-sqlite3-config --with-pkg-config --without-pkg-config --with-sqlcipher --without-sqlcipher --with-sqlite3-dir --without-sqlite3-dir --with-sqlite3-include --without-sqlite3-include=${sqlite3-dir}/include --with-sqlite3-lib --without-sqlite3-lib=${sqlite3-dir}/lib C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:601:in `try_cpp' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:1162:in `block in find_header' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:331:in `open' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:331:in `open' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:357:in `postpone' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:1161:in `find_header' from extconf.rb:68:in `<main>' To see why this extension failed to compile, please check the mkmf.log which can be found here: C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/sqlite3-1.4.2/mkmf.log extconf failed, exit code 1 Gem files will remain installed in C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.2 for inspection. Results logged to C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/sqlite3-1.4.2/gem_make.out An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue. Make sure that `gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/'` succeeds before bundling. In Gemfile: sqlite3 と出ます。しかし、この後もう一度 rails s としても、おんなじCould not find gem 'sqlite3 x64-mingw32' in any of the gem sources listed in your Gemfile. Run `bundle install` to install missing gems. が出てしまいます。
otn

2020/01/24 03:00

installが失敗しているので、何度 rails sしても無駄です。
Magiii

2020/01/24 04:02

そうなんですか!? なにをすればいいかわかりますか??
guest

回答2

0

ベストアンサー

ログを見ないとはっきりしませんが、おそらくsqliteに必要なライブラリをインストールしていないのでしょう。

エラーメッセージを読んでますか?

どういうRubyパッケージをインストールしたのでしょうか?
もし、RubyInstaller + MSYS なら、
pacman -Q | findstr sqlite
で何が表示されますか?

投稿2020/01/24 03:11

otn

総合スコア84557

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

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

Magiii

2020/01/24 04:08

pacman -Q | findstr sqlite と打ち込むと 'pacman' は、内部コマンドまたは外部コマンド、 操作可能なプログラムまたはバッチ ファイルとして認識されていません。 と表示されます。 Rubyinstller + MSYSの6.2.5をダウンロードしました。
otn

2020/01/24 04:17

MSYSをインストールしていればpacmanコマンドが使えるはずですが。 MSYSをインストールしたディレクトリの中の usr\bin に pacman.exe があると思います。
taichi730

2020/01/24 04:53

MSYS 上ではなく、Windows のコマンドプロンプト上で実行しているのでは?
guest

0

類似の質問がありましたが、こちらはご確認されていますでしょうか。

Ruby on RailsにSQLliteを入れようとしたら、'sqlite3 x64-mingw32' が見つからないというエラーが出た
https://teratail.com/questions/130133

windows10でRuby環境構築すると、エラーになる
https://teratail.com/questions/174846

投稿2020/01/24 01:15

nskydiving

総合スコア6500

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

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

Magiii

2020/01/24 03:00

一度読まさしていただいたのですが、gem fileを開く というのが、わからなくてそれ以上進めない状況です。もしよろしければお教えいただきたいです。
nskydiving

2020/01/24 04:03

プロジェクト内に「Gemfile」という名前のファイルがあると思います。 テキスト形式のファイルなので、メモ帳で開くことができます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問