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

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

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

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

Q&A

1回答

645閲覧

rails s がうまくいきません

退会済みユーザー

退会済みユーザー

総合スコア0

Ruby on Rails

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

0グッド

0クリップ

投稿2019/08/15 03:32

rails s を実行すると次のようなコードが出てきてしまいます。

Traceback (most recent call last): 21: from bin/rails:4:in `<main>' 20: from bin/rails:4:in `require' 19: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<top (required)>' 18: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke' 17: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform' 16: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch' 15: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command' 14: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run' 13: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `perform' 12: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `tap' 11: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:145:in `block in perform' 10: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:145:in `require' 9: from c:/Users/user/Ruby on rails/test_app/config/application.rb:7:in `<top (required)>' 8: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler.rb:114:in `require' 7: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:65:in `require' 6: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:65:in `each' 5: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:76:in `block in require' 4: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:76:in `each' 3: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:81:in `block (2 levels) in require' 2: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:81:in `require' 1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:4:in `<top (required)>' C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:4:in `require': cannot load such file -- sqlite3/2.6/sqlite3_native (LoadError) 22: from bin/rails:4:in `<main>' 21: from bin/rails:4:in `require' 20: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<top (required)>' 19: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke' 18: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform' 17: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch' 16: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command' 15: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run' 14: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `perform' 13: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `tap' 12: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:145:in `block in perform' 11: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:145:in `require' 10: from c:/Users/user/Ruby on rails/test_app/config/application.rb:7:in `<top (required)>' 9: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler.rb:114:in `require' 8: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:65:in `require' 7: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:65:in `each' 6: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:76:in `block in require' 5: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:76:in `each' 4: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:81:in `block (2 levels) in require' 3: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:81:in `require' 2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:2:in `<top (required)>' 1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>' C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)

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

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

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

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

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

guest

回答1

0

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

Ruby on Railsをcdから、rails s をした時にsqlite3_nativeがないため、エラー返します。また、sqlite3_nativeを入れても解決できません。
https://teratail.com/questions/44920

rails s で sqlite3関連の (LoadError) がでます。
https://ja.stackoverflow.com/questions/42982/rails-s-%E3%81%A7-sqlite3%E9%96%A2%E9%80%A3%E3%81%AE-loaderror-%E3%81%8C%E3%81%A7%E3%81%BE%E3%81%99

投稿2019/08/15 07:28

nskydiving

総合スコア6500

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

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

退会済みユーザー

退会済みユーザー

2019/08/15 15:22

回答ありがとうございます。 上記URLを参照してRubyやRailsのバージョンを Ruby ruby 2.4.6p354 (2019-04-01 revision 67394) [x64-mingw32] Rails Rails 5.1.6 にしてみたのですが、今度は rails new の時点で create create README.md create Rakefile create config.ru ~~~ Fetching nio4r 2.4.0 Installing nio4r 2.4.0 with native extensions Encoding::CompatibilityError: incompatible character encodings: Windows-31J and UTF-8 An error occurred while installing nio4r (2.4.0), and Bundler cannot continue. Make sure that `gem install nio4r -v '2.4.0' --source 'https://rubygems.org/'` succeeds before bundling. In Gemfile: rails was resolved to 5.1.7, which depends on actioncable was resolved to 5.1.7, which depends on nio4r となってしまいます。vscode内に一応フォルダは作成されてます。 以下、別のことを試した際の結果です。 1, bundle install Could not locate Gemfile 2, gem install nio4r -v '2.4.0' --source 'https://rubygems.org/' Temporarily enhancing PATH for MSYS/MINGW... Building native extensions. This could take a while... Successfully installed nio4r-2.4.0 Parsing documentation for nio4r-2.4.0 Done installing documentation for nio4r after 0 seconds 1 gem installed 大変恐縮ですが教えて頂きたいです。
nskydiving

2019/08/15 22:13

>Could not locate Gemfile Gamefile が見つかりません。 現在のディレクトリに Gamefile を置いてください。 >Temporarily enhancing PATH for MSYS/MINGW... >Building native extensions. This could take a while... >Successfully installed nio4r-2.4.0 >Parsing documentation for nio4r-2.4.0 >Done installing documentation for nio4r after 0 seconds >1 gem installed これはエラーメッセージではなく、成功しているのではないでしょうか?
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

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

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

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問