前提・実現したいこと
ローカル環境でrailsサーバーを立ち上げたいのですが・・・
railsのサーバーが立ち上がらず、様々なサイトを拝見し、一つ一つ問題を解決してきましたが、今回については問題点を把握することができず、3日間程右往左往しております。
■■な機能を実装中に以下のエラーメッセージが発生しました。
rials s もしくはrails serverでサーバーが立ち上がらない
発生している問題・エラーメッセージ
Traceback (most recent call last):
27: from bin/rails:4:in <main>' 26: from bin/rails:4:in
require'
25: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/commands.rb:18:in <top (required)>' 24: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/command.rb:46:in
invoke'
23: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/command/base.rb:69:in perform' 22: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in
dispatch'
21: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in invoke_command' 20: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in
run'
19: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in perform' 18: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in
tap'
17: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:141:in block in perform' 16: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in
require'
15: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in load_dependency' 14: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in
block in require'
13: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in require' 12: from C:/Users/user_name/sample/config/application.rb:7:in
<top (required)>'
11: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.3/lib/bundler.rb:174:in require' 10: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.3/lib/bundler/runtime.rb:58:in
require'
9: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.3/lib/bundler/runtime.rb:58:in each' 8: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.3/lib/bundler/runtime.rb:69:in
block in require'
7: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.3/lib/bundler/runtime.rb:69:in each' 6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.3/lib/bundler/runtime.rb:74:in
block (2 levels) in require'
5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.3/lib/bundler/runtime.rb:74:in require' 4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:4:in
<top (required)>'
3: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in require' 2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in
load_dependency'
1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in block in require' C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in
require': cannot load such file -- sqlite3/2.6/sqlite3_native (LoadError)
28: from bin/rails:4:in <main>' 27: from bin/rails:4:in
require'
26: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/commands.rb:18:in <top (required)>' 25: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/command.rb:46:in
invoke'
24: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/command/base.rb:69:in perform' 23: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in
dispatch'
22: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in invoke_command' 21: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in
run'
20: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in perform' 19: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in
tap'
18: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:141:in block in perform' 17: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in
require'
16: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in load_dependency' 15: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in
block in require'
14: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in require' 13: from C:/Users/user_name/sample/config/application.rb:7:in
<top (required)>'
12: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.3/lib/bundler.rb:174:in require' 11: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.3/lib/bundler/runtime.rb:58:in
require'
10: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.3/lib/bundler/runtime.rb:58:in each' 9: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.3/lib/bundler/runtime.rb:69:in
block in require'
8: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.3/lib/bundler/runtime.rb:69:in each' 7: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.3/lib/bundler/runtime.rb:74:in
block (2 levels) in require'
6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.3/lib/bundler/runtime.rb:74:in require' 5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:2:in
<top (required)>'
4: 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)>' 3: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in
require'
2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in load_dependency' 1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in
block in require'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
エラーメッセージ
該当のソースコード
ソースコード
試したこと
- rails new の際に run git init from "." と表示されたので
--skip-git を追記したところ、うまく動作したように見えます。
2.bundle install や bundle update を試みるも
Could not find gem 'sqlite3 (~> 1.4) x64-mingw32' in any of the gem sources listed in your Gemfile.
Run bundle install
to install missing gems.
と出ました。
gemfile の sqlite を 1.3.6 に変更したところ bundle install は実行されるようになりました。
3.再度、rails s したところ今回の問題が出ました。
初学者のため詳細は分かりませんが、 gem か sqlite3 で問題があるのかと考えておりますが・・・そもそも、--skip-gitするのが問題なのでしょうか?
また、問題解決のため何度かrubyやrails等のインストールを行っております。
可能な限り時系列で記述いたしました。
この他に、必要な情報等ございましたら、その都度記載いたしますので、よろしくお願いします。
補足情報(FW/ツールのバージョンなど)
windows10 64bit
ruby 2.6.5p114 (2019-10-01 revision 67812) [x64-mingw32]
Rails 6.0.2.1
SQLite3 3.30.1
Bundler version 2.1.3
回答1件
あなたの回答
tips
プレビュー