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

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

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

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

Ruby on Rails

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

Q&A

2回答

2441閲覧

rails s コマンドでエラーが出てしまう

kaoru_tujimiya

総合スコア36

Ruby

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

Ruby on Rails

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

0グッド

2クリップ

投稿2018/05/23 00:27

一番下の cannot load such file -- sqlite3/sqlite3_native (LoadError)
と出てるところが問題なところは分かるのですがsqliteを入れてくださいとのことでしょうか?
初心者な為いまいちわからないです。起動できるようにアドバイスのほどよろしくお願いいたします。

以下のコードがrails sで起動したときにでてきた結果になります。

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.0/lib/active_support/dependencies.rb:283:in require'
41: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in load_dependency' 40: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in block in require'
39: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/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.0/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.0/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.0/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.0/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.0/lib/rails/commands.rb:18:in <top (required)>'
33: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/command.rb:46:in invoke' 32: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.2.0/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.0/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.0/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.0/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.0/lib/active_support/dependencies.rb:283:in require' 24: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in load_dependency'
23: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in block in require' 22: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/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.0/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.0/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.0/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.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in require'
17: from C:/Users/Admin/Desktop/研修/rails/sns/config/application.rb:7:in <top (required)>' 16: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler.rb:114:in require'
15: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/runtime.rb:65:in require' 14: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/runtime.rb:65:in each'
13: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/runtime.rb:76:in block in require' 12: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/runtime.rb:76:in each'
11: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/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.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:79:in require'
9: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:70:in require_with_bootsnap_lfi' 8: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/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.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:71:in block in require_with_bootsnap_lfi' 6: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:71: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.0/lib/active_support/dependencies.rb:283:in require' 2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in load_dependency'
1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in block in require' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require': cannot load such file -- sqlite3/sqlite3_native (LoadError)

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

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

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

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

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

kaoru_tujimiya

2018/06/12 04:18

ありがとうございます。試してみます。
kaoru_tujimiya

2018/06/12 06:47

もう一度インストールしたらいけました、ありがとうございました。
guest

回答2

0

sqliteを入れてくださいとのことでしょうか?

その通りだと思います。
すでにインストール済み、とお考えでしたら、インストールに失敗しているのかと思われます。

gem install sqlite3の結果のログを追記いただけますでしょうか。

投稿2018/05/23 00:38

kazto

総合スコア7196

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

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

kaoru_tujimiya

2018/06/05 00:55

kazto さん すみません連絡遅れました、実行してみたところ以下の結果になりました。 Successfully installed sqlite3-1.3.13-x64-mingw32 Parsing documentation for sqlite3-1.3.13-x64-mingw32 Done installing documentation for sqlite3 after 2 seconds 1 gem installed これはインストール済み?ということでしょうか? すみません宜しくお願いします。
kazto

2018/06/05 01:07

いいえ、今回初めてインストールされた、ということでしょう。 この状態で「rails s」は試してみましたでしょうか。
kaoru_tujimiya

2018/06/05 01:12

そうなんですね。「rails s」の実行結果です。 すみませんが宜しくお願いします。 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.0/lib/active_support/dependencies.rb:283:in `require' 41: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency' 40: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `block in require' 39: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/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.0/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.0/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.0/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.0/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.0/lib/rails/commands.rb:18:in `<top (required)>' 33: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/command.rb:46:in `invoke' 32: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.2.0/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.0/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.0/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.0/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.0/lib/active_support/dependencies.rb:283:in `require' 24: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency' 23: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `block in require' 22: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/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.0/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.0/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.0/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.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require' 17: from C:/Users/Admin/Desktop/研修/rails/sns/config/application.rb:7:in `<top (required)>' 16: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler.rb:114:in `require' 15: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/runtime.rb:65:in `require' 14: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/runtime.rb:65:in `each' 13: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/runtime.rb:76:in `block in require' 12: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/runtime.rb:76:in `each' 11: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/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.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:79:in `require' 9: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:70:in `require_with_bootsnap_lfi' 8: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/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.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:71:in `block in require_with_bootsnap_lfi' 6: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:71: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.0/lib/active_support/dependencies.rb:283:in `require' 2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency' 1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `block in require' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
kaoru_tujimiya

2018/06/12 04:20

見てもわからなくて、一度全部消してまたダウンロードしました。 ruby ruby 2.4.4p296 (2018-03-28 revision 63013) [x64-mingw32] rails Rails 5.2.0 rails s の結果がこうなりました。 => Booting Puma => Rails 5.2.0 application starting in development => Run `rails server -h` for more startup options *** SIGUSR2 not implemented, signal based restart unavailable! *** SIGUSR1 not implemented, signal based restart unavailable! *** SIGHUP not implemented, signal based logs reopening unavailable! Puma starting in single mode... * Version 3.11.4 (ruby 2.4.4-p296), codename: Love Song * Min threads: 5, max threads: 5 * Environment: development * Listening on tcp://0.0.0.0:3000
kaoru_tujimiya

2018/06/12 04:39

出来ました。何度も何度もありがとうございました。 すごくスッキリしてます、ありがとうございました。
guest

0

以下の質問と同じエラーのようですね。


以下のサイトにある内容を試してみてはどうでしょう。gemだけでなくsqlite3本体が必要なのだと思われます。

投稿2018/06/11 14:38

tkmtmkt

総合スコア1800

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

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

kaoru_tujimiya

2018/06/12 04:22

コメントありがとうございます。 見る前に一度アンインストールしてもう一度インストールしました。 バージョンは ruby ruby 2.4.4p296 (2018-03-28 revision 63013) [x64-mingw32] rails Rails 5.2.0 rails s の結果がこうなりました。 => Booting Puma => Rails 5.2.0 application starting in development => Run `rails server -h` for more startup options *** SIGUSR2 not implemented, signal based restart unavailable! *** SIGUSR1 not implemented, signal based restart unavailable! *** SIGHUP not implemented, signal based logs reopening unavailable! Puma starting in single mode... * Version 3.11.4 (ruby 2.4.4-p296), codename: Love Song * Min threads: 5, max threads: 5 * Environment: development * Listening on tcp://0.0.0.0:3000
kaoru_tujimiya

2018/06/12 06:48

これで、いけました、助言ありがとうございました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問