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

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

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

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

Ruby

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

Ruby on Rails 6

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

SQLite

SQLiteはリレーショナルデータベース管理システムの1つで、サーバーではなくライブラリとして使用されている。

Q&A

解決済

2回答

2095閲覧

WindowsにRails6の環境を構築したいのですができません。

Smith.A

総合スコア16

Windows 10

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

Ruby

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

Ruby on Rails 6

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

SQLite

SQLiteはリレーショナルデータベース管理システムの1つで、サーバーではなくライブラリとして使用されている。

0グッド

0クリップ

投稿2020/04/05 03:10

rubyのインストールが終わり、rails6をインストールしました。
バージョンはrubyは2.6.6p146 (2020-03-31 revision 67876) [x64-mingw32]
railsは6.0.2.2です。
カレントディレクトリはC:\Ruby26-x64でその下に

ruby

1rails new myapp

でアプリを作っていこうと思ったのですが、
次のようなエラーが出ました。

ruby

1    exist 2 create README.md 3 create Rakefile 4 create .ruby-version 5 create config.ru 6 create .gitignore 7 create Gemfile 8 run git init from "." 9Reinitialized existing Git repository in C:/Ruby26-x64/myapp/.git/ 10 create package.json 11 exist app 12 identical app/assets/config/manifest.js 13 identical app/assets/stylesheets/application.css 14 identical app/channels/application_cable/channel.rb 15 identical app/channels/application_cable/connection.rb 16 identical app/controllers/application_controller.rb 17 identical app/helpers/application_helper.rb 18 identical app/javascript/channels/consumer.js 19 identical app/javascript/channels/index.js 20 identical app/javascript/packs/application.js 21 identical app/jobs/application_job.rb 22 identical app/mailers/application_mailer.rb 23 identical app/models/application_record.rb 24 identical app/views/layouts/application.html.erb 25 identical app/views/layouts/mailer.html.erb 26 identical app/views/layouts/mailer.text.erb 27 identical app/assets/images/.keep 28 identical app/controllers/concerns/.keep 29 identical app/models/concerns/.keep 30 exist bin 31 identical bin/rails 32 identical bin/rake 33 identical bin/setup 34 identical bin/yarn 35 exist config 36 identical config/routes.rb 37 identical config/application.rb 38 identical config/environment.rb 39 identical config/cable.yml 40 identical config/puma.rb 41 identical config/storage.yml 42 exist config/environments 43 identical config/environments/development.rb 44 identical config/environments/production.rb 45 identical config/environments/test.rb 46 exist config/initializers 47 identical config/initializers/application_controller_renderer.rb 48 identical config/initializers/assets.rb 49 identical config/initializers/backtrace_silencers.rb 50 identical config/initializers/content_security_policy.rb 51 identical config/initializers/cookies_serializer.rb 52 create config/initializers/cors.rb 53 identical config/initializers/filter_parameter_logging.rb 54 identical config/initializers/inflections.rb 55 identical config/initializers/mime_types.rb 56 create config/initializers/new_framework_defaults_6_0.rb 57 identical config/initializers/wrap_parameters.rb 58 exist config/locales 59 identical config/locales/en.yml 60 append .gitignore 61 identical config/boot.rb 62 identical config/database.yml 63 exist db 64 identical db/seeds.rb 65 exist lib 66 exist lib/tasks 67 identical lib/tasks/.keep 68 exist lib/assets 69 identical lib/assets/.keep 70 exist log 71 identical log/.keep 72 exist public 73 identical public/404.html 74 identical public/422.html 75 identical public/500.html 76 identical public/apple-touch-icon-precomposed.png 77 identical public/apple-touch-icon.png 78 identical public/favicon.ico 79 identical public/robots.txt 80 exist tmp 81 identical tmp/.keep 82 exist tmp/pids 83 identical tmp/pids/.keep 84 exist tmp/cache 85 exist tmp/cache/assets 86 exist vendor 87 identical vendor/.keep 88 exist test/fixtures 89 identical test/fixtures/.keep 90 exist test/fixtures/files 91 identical test/fixtures/files/.keep 92 exist test/controllers 93 identical test/controllers/.keep 94 exist test/mailers 95 identical test/mailers/.keep 96 exist test/models 97 identical test/models/.keep 98 exist test/helpers 99 identical test/helpers/.keep 100 exist test/integration 101 identical test/integration/.keep 102 identical test/channels/application_cable/connection_test.rb 103 identical test/test_helper.rb 104 exist test/system 105 identical test/system/.keep 106 identical test/application_system_test_case.rb 107 exist storage 108 identical storage/.keep 109 exist tmp/storage 110 identical tmp/storage/.keep 111 remove config/initializers/cors.rb 112 remove config/initializers/new_framework_defaults_6_0.rb 113 run bundle install 114Fetching gem metadata from https://rubygems.org/............. 115Fetching gem metadata from https://rubygems.org/. 116Resolving dependencies........ 117Using rake 13.0.1 118Using concurrent-ruby 1.1.6 119Using i18n 1.8.2 120Using minitest 5.14.0 121Using thread_safe 0.3.6 122Using tzinfo 1.2.7 123Using zeitwerk 2.3.0 124Using activesupport 6.0.2.2 125Using builder 3.2.4 126Using erubi 1.9.0 127Using mini_portile2 2.4.0 128Using nokogiri 1.10.9 (x64-mingw32) 129Using rails-dom-testing 2.0.3 130Using crass 1.0.6 131Using loofah 2.4.0 132Using rails-html-sanitizer 1.3.0 133Using actionview 6.0.2.2 134Using rack 2.2.2 135Using rack-test 1.1.0 136Using actionpack 6.0.2.2 137Using nio4r 2.5.2 138Using websocket-extensions 0.1.4 139Using websocket-driver 0.7.1 140Using actioncable 6.0.2.2 141Using globalid 0.4.2 142Using activejob 6.0.2.2 143Using activemodel 6.0.2.2 144Using activerecord 6.0.2.2 145Using mimemagic 0.3.4 146Using marcel 0.3.3 147Using activestorage 6.0.2.2 148Using mini_mime 1.0.2 149Using mail 2.7.1 150Using actionmailbox 6.0.2.2 151Using actionmailer 6.0.2.2 152Using actiontext 6.0.2.2 153Using public_suffix 4.0.3 154Using addressable 2.7.0 155Using bindex 0.8.1 156Using msgpack 1.3.3 (x64-mingw32) 157Using bootsnap 1.4.6 158Using bundler 2.1.4 159Using byebug 11.1.1 160Using regexp_parser 1.7.0 161Using xpath 3.2.0 162Using capybara 3.32.0 163Using childprocess 3.0.0 164Using ffi 1.12.2 (x64-mingw32) 165Using jbuilder 2.10.0 166Using method_source 1.0.0 167Using puma 4.3.3 168Using rack-proxy 0.6.5 169Using thor 1.0.1 170Using railties 6.0.2.2 171Using sprockets 4.0.0 172Using sprockets-rails 3.2.1 173Using rails 6.0.2.2 174Using rubyzip 2.3.0 175Using sassc 2.2.1 (x64-mingw32) 176Using tilt 2.0.10 177Using sassc-rails 2.1.2 178Using sass-rails 6.0.0 179Using selenium-webdriver 3.142.7 180Fetching sqlite3 1.4.2 181Installing sqlite3 1.4.2 with native extensions 182エラー: mingw32: "Alexey Pavlov (Alexpux) <alexpux@gmail.com>" の署名は信頼されていません 183エラー: mingw64: "Alexey Pavlov (Alexpux) <alexpux@gmail.com>" の署名は信頼されていません 184エラー: msys: "Alexey Pavlov (Alexpux) <alexpux@gmail.com>" の署名は信頼されていません 185エラー: データベース 'mingw32' は無効です (無効または破損したデータベース (PGP)) 186エラー: データベース 'mingw64' は無効です (無効または破損したデータベース (PGP)) 187エラー: データベース 'msys' は無効です (無効または破損したデータベース (PGP)) 188Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 189 190current directory: 191C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.2/ext/sqlite3 192C:/Ruby26-x64/bin/ruby.exe -I C:/Ruby26-x64/lib/ruby/2.6.0 -r 193./siteconf20200405-13380-smdirj.rb extconf.rb 194checking for sqlite3.h... no 195sqlite3.h is missing. Install SQLite3 from http://www.sqlite.org/ first. 196*** extconf.rb failed *** 197Could not create Makefile due to some reason, probably lack of necessary 198libraries and/or headers. Check the mkmf.log file for more details. You may 199need configuration options. 200 201Provided configuration options: 202 --with-opt-dir 203 --without-opt-dir 204 --with-opt-include 205 --without-opt-include=${opt-dir}/include 206 --with-opt-lib 207 --without-opt-lib=${opt-dir}/lib 208 --with-make-prog 209 --without-make-prog 210 --srcdir=. 211 --curdir 212 --ruby=C:/Ruby26-x64/bin/$(RUBY_BASE_NAME) 213 --with-sqlcipher 214 --without-sqlcipher 215 --with-sqlite3-config 216 --without-sqlite3-config 217 --with-pkg-config 218 --without-pkg-config 219 --with-sqlcipher 220 --without-sqlcipher 221 --with-sqlite3-dir 222 --without-sqlite3-dir 223 --with-sqlite3-include 224 --without-sqlite3-include=${sqlite3-dir}/include 225 --with-sqlite3-lib 226 --without-sqlite3-lib=${sqlite3-dir}/lib 227 228To see why this extension failed to compile, please check the mkmf.log which can 229be found here: 230 231C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/sqlite3-1.4.2/mkmf.log 232 233extconf failed, exit code 1 234 235Gem files will remain installed in 236C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.2 for inspection. 237Results logged to 238C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/sqlite3-1.4.2/gem_make.out 239 240An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue. 241Make sure that `gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/'` 242succeeds before bundling. 243 244In Gemfile: 245 sqlite3 246 run bundle binstubs bundler 247Could not find gem 'sqlite3 (~> 1.4) x64-mingw32' in any of the gem sources 248listed in your Gemfile. 249 rails webpacker:install 250Could not find gem 'sqlite3 (~> 1.4) x64-mingw32' in any of the gem sources listed in your Gemfile. 251Run `bundle install` to install missing gems. 252

エラー文がたくさんありどれから解決して良いのかわかりません。
また解決の仕方もわかりません。
どなたか詳しい方教えていただけませんか。

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

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

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

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

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

guest

回答2

0

ベストアンサー

直接の回答ではありませんが、そもそも論としてWindowsに直接Rails環境を構築すること自体が、あまりおすすめできません。

特に、サーバでの実運用を考えるなら、サーバは大抵の場合Unix系ですので、その練習にもなるようUnix系の環境(WSL、仮想マシンなど)を構築して、その上でRails環境を作ることをおすすめします。

投稿2020/04/05 03:25

maisumakun

総合スコア145183

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

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

0

エラーの元はこれです。

plain

1Installing sqlite3 1.4.2 with native extensions 2エラー: mingw32: "Alexey Pavlov (Alexpux) <alexpux@gmail.com>" の署名は信頼されていません 3エラー: mingw64: "Alexey Pavlov (Alexpux) <alexpux@gmail.com>" の署名は信頼されていません 4エラー: msys: "Alexey Pavlov (Alexpux) <alexpux@gmail.com>" の署名は信頼されていません 5エラー: データベース 'mingw32' は無効です (無効または破損したデータベース (PGP 鍵)) 6エラー: データベース 'mingw64' は無効です (無効または破損したデータベース (PGP 鍵)) 7エラー: データベース 'msys' は無効です (無効または破損したデータベース (PGP 鍵)) 8Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

最近同様の質問を見ましたが、解決していないようです。

投稿2020/04/05 04:30

otn

総合スコア84498

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

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

Smith.A

2020/04/05 04:42

このエラーを解消するにはWSLなどで環境構築をするのが良いのでしょうか。
otn

2020/04/05 08:05

私の環境では発生していないので、わかりません。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問