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

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

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

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

Q&A

0回答

434閲覧

rails s でサーバーが立ち上がらない

yuto_takeo

総合スコア4

Ruby on Rails

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

0グッド

0クリップ

投稿2020/04/21 09:26

バージョン
Rails 5.2.4.2
Ruby 2.6.6p146 (2020-03-31 revision 67876) [x64-mingw32]

rails s と入れるとこんなものが出てきてしまいます。
以下のコードは何を言っているのでしょうか?初心者で戸惑っています...
どなたか分かる方いらっしゃいませんか?

C:\Users\username\sample>rails

1Traceback (most recent call last): 2 21: from bin/rails:4:in `<main>' 3 20: from bin/rails:4:in `require' 4 19: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/commands.rb:18:in `<top (required)>' 5 18: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/command.rb:46:in `invoke' 6 17: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/command/base.rb:69:in `perform' 7 16: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch' 8 15: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command' 9 14: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run' 10 13: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/commands/server/server_command.rb:142:in `perform' 11 12: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/commands/server/server_command.rb:142:in `tap' 12 11: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/commands/server/server_command.rb:145:in `block in perform' 13 10: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/commands/server/server_command.rb:145:in `require' 14 9: from C:/Users/username/sample/config/application.rb:7:in `<top (required)>' 15 8: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler.rb:114:in `require' 16 7: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:65:in `require' 17 6: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:65:in `each' 18 5: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:76:in `block in require' 19 4: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:76:in `each' 20 3: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:81:in `block (2 levels) in require' 21 2: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:81:in `require' 22 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)>' 23C:/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) 24 22: from bin/rails:4:in `<main>' 25 21: from bin/rails:4:in `require' 26 20: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/commands.rb:18:in `<top (required)>' 27 19: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/command.rb:46:in `invoke' 28 18: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/command/base.rb:69:in `perform' 29 17: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch' 30 16: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command' 31 15: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run' 32 14: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/commands/server/server_command.rb:142:in `perform' 33 13: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/commands/server/server_command.rb:142:in `tap' 34 12: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/commands/server/server_command.rb:145:in `block in perform' 35 11: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.4.2/lib/rails/commands/server/server_command.rb:145:in `require' 36 10: from C:/Users/username/sample/config/application.rb:7:in `<top (required)>' 37 9: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler.rb:114:in `require' 38 8: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:65:in `require' 39 7: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:65:in `each' 40 6: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:76:in `block in require' 41 5: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:76:in `each' 42 4: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:81:in `block (2 levels) in require' 43 3: from C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:81:in `require' 44 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)>' 45 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)>' 46C:/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) 47コード

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

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

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

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

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

chocolate24

2020/04/21 12:57

bundle installしましたか?
yuto_takeo

2020/04/22 00:18

ありがとうございます。 以前以下の記事と同じ状況で、とりあえずこれ通りにやってみました。 bundle -v とコマンドプロンプトでやってもちゃんとBundler version 1. 17.2と出てきます。これはインストールされていると言うことでしょうか? https://qiita.com/riest817/items/d23e8fcd987ae008eb6d
chocolate24

2020/04/22 06:52

はい!大丈夫です。私が実装中のアプリで試してみたところ、Bundler version 1.17.3と表示されました。17.2と17.3の違いは特に気にしなくて良いと思います。
yuto_takeo

2020/04/22 09:28

そうですか!よかったです。 しかしbundleもちゃんと入っているとなると他にエラーが出る原因として何が考えられるでしょうか...
chocolate24

2020/04/22 09:35

コマンドで $ gem uninstall -a sqlite3 $ gem install sqlite3 --platform=rubyとしてみてください
yuto_takeo

2020/04/23 01:31

やってみました。 uninstallはうまくいったのですがinstall で以下のエラーがはっせいしてしまいました... Temporarily enhancing PATH for MSYS/MINGW... Installing required msys2 packages: mingw-w64-x86_64-sqlite3 警告: mingw-w64-x86_64-sqlite3-3.31.1-1 は最新です -- スキップ Building native extensions. This could take a while... ERROR: Error installing sqlite3: 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 ./siteconf20200423-13284-1tujj64.rb extconf.rb *** 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 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:552:in `try_link0' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:570:in `try_link' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:672:in `try_ldflags' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:1832:in `pkg_config' from extconf.rb:35: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
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

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

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

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問