sqlite3-ruby: Cannot load such file -- sqlite3/sqlite3_native (LoadError)
At this time I just updated the ruby to the ruby version 2.5.1p57 (revision 2018-03-29 63029) [i386-mingw32] update it with rubyinstaller-devkit-2.5.1-2-x86. exe , when I try to execute rails s shows me this error :
$ rails s
C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap-
1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': cannot load such file --
sqlite3/sqlite3_native (LoadError)
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-
5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-
5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-
5.2.1/lib/active_support/dependencies.rb:287:in `require'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/sqlite3-1.3.13-x86-mingw32/lib/sqlite3.rb:6:in `rescue in
<top (required)>'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/sqlite3-1.3.13-x86-mingw32/lib/sqlite3.rb:2:in `<top
(required)>'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap-
1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap-
1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in
require_with_bootsnap_lfi'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap-
1.3.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap-
1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap-
1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:81:in `block (2
levels) in require'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:76:in `each'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:76:in `block in
require'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:65:in `each'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:65:in `require'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-1.16.4/lib/bundler.rb:114:in `require'
from C:/users/angulo/projects_ruby/projects_rails/rails_app/config/application.rb:18:in `<top
(required)>'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap-
1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap-
1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in
require_with_bootsnap_lfi'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap-
1.3.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap-
1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap-
1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-
5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-
5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-
5.2.1/lib/active_support/dependencies.rb:287:in `require'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-
5.2.1/lib/rails/commands/server/server_command.rb:145:in `block in perform'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-
5.2.1/lib/rails/commands/server/server_command.rb:142:in `tap'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-
5.2.1/lib/rails/commands/server/server_command.rb:142:in `perform'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `
invoke_command'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.1/lib/rails/command/base.rb:65:in `perform'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.1/lib/rails/command.rb:46:in `invoke'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/railties-5.2.1/lib/rails/commands.rb:18:in `<top
(required)>'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap
-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap-
1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in
require_with_bootsnap_lfi'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap-
1.3.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap-
1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bootsnap-
1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-
5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-
5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
from C:/Ruby25/lib/ruby/gems/2.5.0/gems/activesupport-
5.2.1/lib/active_support/dependencies.rb:287:in `require'
from bin/rails:4:in `<main>'
Clearly does not let me require 'sqlite3'
I try to solve it with issues like : https://github.com/sparklemotion/sqlite3-ruby/issues/185 , https://github.com/sparklemotion/sqlite3-ruby/issues/185 , but none of the solutions that this poetry worked for me
My environment :
- Windows 7 x32 bits
- ruby version `2.5.1p57 (revision 2018-03-29 63029) [i386-mingw32]
- Rails 5.2.1
To reproduce :
- run
rails new rails_app - run
rails s
I hope it is solved, Thanks for reading
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 6
- Comments: 46 (2 by maintainers)
This still fixes it for me.
@Learning191 , I am still facing the same issue. Were you able to resolve it ?
Re installing on Windows with Ruby >= 2.4, used the following with both Ruby trunk & 2.5.3:
This was helpful in resolving it more permanently for me: https://github.com/sparklemotion/sqlite3-ruby/issues/241#issuecomment-431700715
@Learning191 , you can use : https://github.com/sparklemotion/sqlite3-ruby/issues/224#issuecomment-416800097,
I tried resolving by the above method and got the server working for ruby 2.5 and rails 5.2.1. There seems to be a sqllite3 issue.
@alaurie sorry, absolutely no success:
this is the … mkmf.log
I did a search on my machine, and found
C:\msys64\mingw64\include\sqlite3.h
Same here, windows msys2