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

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

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

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

Q&A

解決済

1回答

454閲覧

Ruby on Rails の環境構築について(sqlite3関連?)

shinhori

総合スコア12

Ruby on Rails

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

0グッド

0クリップ

投稿2018/08/16 16:12

編集2018/08/16 16:24

windowsでRailsをインストールして,"rails server"とサーバーを立ち上げようとするとエラーが出てしまいます.エラーメッセージからsqlite3関連の問題だとは思うのですが..."rails new ..."はできました.

C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)

全体です

Traceback (most recent call last): 43: from bin/rails:4:in `<main>' 42: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require' 41: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency' 40: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require' 39: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require' 38: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi' 37: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register' 36: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi' 35: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require' 34: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.2.1/lib/rails/commands.rb:18:in `<top (required)>' 33: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.2.1/lib/rails/command.rb:46:in `invoke' 32: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.2.1/lib/rails/command/base.rb:65:in `perform' 31: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch' 30: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command' 29: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run' 28: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:142:in `perform' 27: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:142:in `tap' 26: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:145:in `block in perform' 25: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require' 24: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency' 23: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require' 22: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require' 21: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi' 20: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register' 19: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi' 18: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require' 17: from C:/Users/horim/firstapp/config/application.rb:7:in `<top (required)>' 16: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler.rb:114:in `require' 15: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/runtime.rb:65:in `require' 14: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/runtime.rb:65:in `each' 13: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/runtime.rb:76:in `block in require' 12: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/runtime.rb:76:in `each' 11: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/runtime.rb:81:in `block (2 levels) in require' 10: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require' 9: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi' 8: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register' 7: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi' 6: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require' 5: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:2:in `<top (required)>' 4: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>' 3: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require' 2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency' 1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)

gem install sqlite3 でgemは入れました.リストで確認もしました.
調べるとRubyファイルのbinファイルにsqlite3.dllを入れるというのも見たので試しましたが,変わりませんでした.
また,Rubyのバージョン(2.5.1)にsqlite3(1.3.13)が対応していないという記述も見たのですが,その場合2.4など前のバージョンのRubyを入れ直せば良いのでしょうか.railsは5.2.1ですが,こちらのバージョンも変えたほうが良いでしょうか.
初めての質問で至らない部分も多いでしょうが,回答いただけると幸いです.

gemのlist

actioncable (5.2.1) actionmailer (5.2.1) actionpack (5.2.1) actionview (5.2.1) activejob (5.2.1) activemodel (5.2.1) activerecord (5.2.1) activestorage (5.2.1) activesupport (5.2.1) addressable (2.5.2) archive-zip (0.11.0) arel (9.0.0) bigdecimal (1.3.5, default: 1.3.4) bindex (0.5.0) bootsnap (1.3.1) builder (3.2.3) bundler (1.16.3) byebug (10.0.2) capybara (3.6.0) childprocess (0.9.0) chromedriver-helper (1.2.0) cmath (default: 1.0.0) coffee-rails (4.2.2) coffee-script (2.4.1) coffee-script-source (1.12.2) concurrent-ruby (1.0.5) crass (1.0.4) csv (3.0.0, default: 1.0.0) date (default: 1.0.0) dbm (default: 1.0.0) did_you_mean (1.2.1, 1.2.0) duktape (2.0.1.0) erubi (1.7.1) etc (1.0.1, default: 1.0.0) execjs (2.7.0) fcntl (default: 1.0.0) ffi (1.9.25 x64-mingw32) fiddle (default: 1.0.0) fileutils (1.1.0, default: 1.0.2) gdbm (default: 2.0.0) globalid (0.4.1) i18n (1.1.0) io-console (default: 0.4.6) io-like (0.3.0) ipaddr (default: 1.2.0) jbuilder (2.7.0) json (default: 2.1.0) loofah (2.2.2) mail (2.7.0) marcel (0.3.2) method_source (0.9.0) mimemagic (0.3.2) mini_mime (1.0.1) mini_portile2 (2.3.0) minitest (5.11.3, 5.10.3) msgpack (1.2.4 x64-mingw32) multi_json (1.13.1) net-telnet (0.2.0, 0.1.1) nio4r (2.3.1) nokogiri (1.8.4 x64-mingw32) openssl (default: 2.1.0) power_assert (1.1.3, 1.1.1) psych (default: 3.0.2) public_suffix (3.0.3, 3.0.2) puma (3.12.0) rack (2.0.5) rack-test (1.1.0) rails (5.2.1) rails-dom-testing (2.0.3) rails-html-sanitizer (1.0.4) railties (5.2.1) rake (12.3.1, 12.3.0) rb-fsevent (0.10.3) rb-inotify (0.9.10) rdoc (default: 6.0.1) rubyzip (1.2.1) sass (3.5.7) sass-listen (4.0.0) sass-rails (5.0.7) scanf (default: 1.0.0) sdbm (default: 1.0.0) selenium-webdriver (3.14.0) sprockets (3.7.2) sprockets-rails (3.2.1) sqlite3 (1.3.13 x64-mingw32) stringio (default: 0.0.1) strscan (default: 1.0.0) test-unit (3.2.8, 3.2.7) thor (0.20.0) thread_safe (0.3.6) tilt (2.0.8) turbolinks (5.1.1) turbolinks-source (5.1.0) tzinfo (1.2.5) tzinfo-data (1.2018.5) uglifier (4.1.18) web-console (3.6.2) webrick (default: 1.4.2) websocket-driver (0.7.0) websocket-extensions (0.1.3) xmlrpc (0.3.0) xpath (3.1.0) zlib (default: 1.0.0)

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

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

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

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

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

guest

回答1

0

ベストアンサー

windowsでRailsをインストールして,"rails server"とサーバーを立ち上げようとするとエラーが出てしまいます.エラーメッセージからsqlite3関連の問題だとは思うのですが...

おおよそその通りです。WindowsではRubyは2.4系を選択してください。Railsのバージョンは5.2でも問題ないと思いますが、何か不具合があれば、その都度ダウングレードすればいいと思います。

投稿2018/08/17 03:40

退会済みユーザー

退会済みユーザー

総合スコア0

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

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

shinhori

2018/08/17 05:28

なるほど.ありがとうございます!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問