If you follow @ shuhey's article, it will be almost solved. It didn't work when I did it with Ruby 2.6.6, so it's just a memo ...
windows10 Home Ruby+Devkit 2.6.6-1 (x64) Rails 5.1.6
Ruby on Rails Tutorial and Rails Girls Installation Recipe (Windows Setup (for those who cannot use WSL)) When I built the environment according to / install # setup_for_windows_without_wsl) and executed the rails server
command, the following error occurred. (@ Shuhey's article has changed to Ruby26-x64-> Ruby25-x64
, 2.6.0-> 2.5.0
)
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)
Here, following @ shuhey's article C: \ Ruby26-x64 \ lib \ ruby \ gems \ 2.6.0 \ gems \ sqlite3-1.3 Create a new
2.5 directory in .13-x64-mingw32 \ lib \ sqlite3
, copy sqlite3_native.so
into it, and execute the rails server
command again!
I thought this would solve it, but I still got the same error ...
Take a look at the error message C: /Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb
. Then, on the 3rd and 4th lines
sqlite3.rb
RUBY_VERSION =~ /(\d+\.\d+)/
require "sqlite3/#{$1}/sqlite3_native"
I see.
Did the 2.5
directory mean the version of Ruby! (Why didn't you notice it lol)
So create a new 2.6
directory, copy sqlite3_native.so
and run the rails server
command.
Finally succeeded in starting the Rails application.
=> Booting Puma
=> Rails 5.1.6 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.9.1 (ruby 2.6.6-p146), codename: Private Caller
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop
Access localhost: 3000
with a browser and check the operation
Recommended Posts