1

So when I make a rails new Myappwhichever and try to do any rake db:migrate or just even boot the server with rails s, I get errors. Some are cannot load such file sqlite3native.

I tried the solution here :windows 10 ruby2.5 rails 5.1.5 cannot load such file -- sqlite3/sqlite3_native (LoadError)

but I dont think it did anything.

Help! Thanks (running windows 10)

Traceback (most recent call last):
    22: from bin/rails:4:in `<main>'
    21: from bin/rails:4:in `require'
    20: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.1.5/lib/rails/commands.rb:16:in `<top (required)>'
    19: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.1.5/lib/rails/command.rb:44:in `invoke'
    18: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.1.5/lib/rails/command/base.rb:63:in `perform'
    17: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
    16: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
    15: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
    14: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.1.5/lib/rails/commands/server/server_command.rb:130:in `perform'
    13: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.1.5/lib/rails/commands/server/server_command.rb:130:in `tap'
    12: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.1.5/lib/rails/commands/server/server_command.rb:133:in `block in perform'
    11: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.1.5/lib/rails/commands/server/server_command.rb:133:in `require'
    10: from C:/Users/Owner/Desktop/rubynew/tiredofthis/config/application.rb:7:in `<top (required)>'
     9: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler.rb:114:in `require'
     8: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `require'
     7: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `each'
     6: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `block in require'
     5: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `each'
     4: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
     3: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `require'
     2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:2:in `<top (required)>'
     1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
mrzasa
  • 22,895
  • 11
  • 56
  • 94
ima_prog
  • 119
  • 1
  • 9
  • please, paste the error you're getting – mrzasa Mar 21 '18 at 23:50
  • thanks for reminding! – ima_prog Mar 21 '18 at 23:53
  • see here: https://stackoverflow.com/questions/17643897/cannot-load-such-file-sqlite3-sqlite3-native-loaderror-on-ruby-on-rails – mrzasa Mar 21 '18 at 23:55
  • 1
    Possible duplicate of [cannot load such file -- sqlite3/sqlite3\_native (LoadError) on ruby on rails](https://stackoverflow.com/questions/17643897/cannot-load-such-file-sqlite3-sqlite3-native-loaderror-on-ruby-on-rails) – mrzasa Mar 21 '18 at 23:55
  • in my sqlite3gemspec file in the C folder i have a ' s.require_paths = ["lib".freeze]' What do I do with the freeze? – ima_prog Mar 21 '18 at 23:59
  • Just changed it to s.require_paths = ["lib/sqlite3_native".freeze] and it didnt work same errors – ima_prog Mar 22 '18 at 00:01
  • see answers here: https://stackoverflow.com/a/6126062/580346 – mrzasa Mar 22 '18 at 00:31

1 Answers1

0

This may be obvious but did you first run the following?

bundle install
rake db:create db:migrate

and also maybe see: Error "no such file to load" -- sqlite3/sqlite3_native (LoadError)

lacostenycoder
  • 10,623
  • 4
  • 31
  • 48