Home>

I downloaded and installed the following, but I can't start the server and I can't build the environment for ruby ​​on rails.
windows10

Visual Studio Code
ruby 2.6.6p146 (2020-03-31 revision 67876) [x64-mingw32]
Rails 6.0.3.4
sqlite3 (~>1.4) x64-mingw32
node v12.19.0
yarn 1.22.5

In the gemfile
ruby '2.6.6'

Bundle edge Rails instead: gem'rails', github:'rails/rails'

gem'rails','~>6.0.3','>= 6.0.3.4'

Use sqlite3 as the database for Active Record

gem'sqlite3','~>1.3.6'

Use Puma as the app server

gem'puma','~>4.1'

Use SCSS for stylesheets

gem'sass-rails','>= 6'

Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker

gem'webpacker','~>4.0'

Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks

gem'turbolinks','~>5'

Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder

gem'jbuilder','~>2.7'

Use Redis adapter to run Action Cable in production gem'redis','~>4.0' Use Active Model has_secure_passwordgem'bcrypt','~>3.1.7' Use Active Storage variant gem'image_processing','~>1.2' Reduces boot times through caching;required in config/boot.rb

gem'bootsnap','>= 1.4.2', require: false

group: development,: test do

Call'byebug' anywhere in the code to stop execution and get a debugger console

gem'byebug', platforms: [: mri,: mingw,: x64_mingw]
end

group: development do

Access an interactive console on exception pages or by calling'console' anywhere in the code.

gem'web-console','>= 3.3.0'
end

Error message


raceback (most recent call last):
27: from bin/rails: 4: in

' 26: from bin/rails: 4: inrequire'
25: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.4/lib/rails/commands.rb:18:in' 24: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.4/lib/rails/command.rb:46:ininvoke'
23: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.4/lib/rails/command/base.rb: 69: inperform' 22: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor.rb: 392: indispatch'
21: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:ininvoke_command' 20: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:inrun'
19: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.4/lib/rails/commands/server/server_command.rb: 138: inperform' 18: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.4/lib/rails/commands/server/server_command.rb: 138: intap'
17: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.4/lib/rails/commands/server/server_command.rb: 141: inblock in perform'16: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:inrequire'
15: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:inload_dependency' 14: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:inblock in require'
13: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:inrequire' 12: from C: /Users/Holy/Desktop/work/app/config/application.rb:7:in'
11: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler.rb: 174: inrequire' 10: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb: 58: inrequire'
9: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb: 58: ineach' 8: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb: 69: inblock in require'
7: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb: 69: ineach' 6: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb: 74: inblock (2 levels) in require'
5: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb: 74: inrequire' 4: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:4:in'
3: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:inrequire' 2: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb: 291: inload_dependency'
1: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:inblock in require' C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:inrequire': cannot load such file
--sqlite3/2.6/sqlite3_native (LoadError)
28: from bin/rails: 4: in
' 27: from bin/rails: 4: inrequire'
26: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.4/lib/rails/commands.rb:18:in' 25: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.4/lib/rails/command.rb:46:ininvoke'
24: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.4/lib/rails/command/base.rb: 69: inperform' 23: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor.rb: 392: indispatch'
22: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:ininvoke_command' 21: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:inrun'
20: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.4/lib/rails/commands/server/server_command.rb: 138: inperform' 19: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.4/lib/rails/commands/server/server_command.rb: 138: intap'
18: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.4/lib/rails/commands/server/server_command.rb: 141: inblock in perform' 17: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:inrequire'
16: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:inload_dependency' 15: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:inblock in require'
14: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:inrequire' 13: from C: /Users/Holy/Desktop/work/app/config/application.rb:7:in'
12: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler.rb: 174: inrequire' 11: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb: 58: inrequire'
10: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb: 58: ineach' 9: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb: 69: inblock in require'
8: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb: 69: ineach' 7: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb: 74: inblock (2 levels) in require'
6: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb: 74: inrequire' 5: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:2:in'
4: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:6:inrescue in' 3: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:inrequire'
2: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb: 291: inload_dependency' 1: from C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:inblock in require'
C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb: 324: in `require': cannot load such file --sqlite3/sqlite3_native (LoadError)

Corresponding source code
Source code
What I tried

Lowered the version of sqlite3.

Supplementary information (FW/tool version, etc.)

I've been fighting this for a week.

  • Answer # 1

    Please give up building the environment directly on Windows.
    It is certain to build a virtual environment with VirtualBox etc. and build it on a Linux OS, and there will be almost no problems.