0

I've just installed ruby on rails after a tutorial on Windows so I can learn it, but this gives me headaches. I have this error when trying to migrate the db:

    c:\row\dev\hello_world>rake db:migrate
rake aborted!
LoadError: cannot load such file -- sqlite3/sqlite3_native
c:/row/dev/hello_world/config/application.rb:7:in `<top (required)>'
c:/row/dev/hello_world/Rakefile:4:in `require_relative'
c:/row/dev/hello_world/Rakefile:4:in `<top (required)>'
LoadError: cannot load such file -- sqlite3/2.3/sqlite3_native
c:/row/dev/hello_world/config/application.rb:7:in `<top (required)>'
c:/row/dev/hello_world/Rakefile:4:in `require_relative'
c:/row/dev/hello_world/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

c:\row\dev\hello_world>rails s
c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11-x64-mingw32/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
        from c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11-x64-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>'
        from c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11-x64-mingw32/lib/sqlite3.rb:2:in `<top (required)>'
        from c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `require'
        from c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `block (2 levels) in require'
        from c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each'
        from c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require'
        from c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each'
        from c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require'
        from c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler.rb:102:in `require'
        from c:/row/dev/hello_world/config/application.rb:7:in `<top (required)>'
        from c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:88:in `require'
        from c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:88:in `block in server'
        from c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `tap'
        from c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `server'
        from c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
        from c:/row/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands.rb:18:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

I was trying to run gem install sqlite3 in "row" directory, but after install nothing changed.

Razvan Cuceu
  • 587
  • 2
  • 5
  • 24
  • 1
    Please post errors as **plain text** and not as images that are really hard to read. Did you do `bundle install`? Did that succeed? – tadman Jul 13 '16 at 08:39
  • did you already install sqlite3 in ubuntu ? – M. Karim Jul 13 '16 at 08:40
  • @tadman I followed up a tutorial and he didn't bundle install nothing – Razvan Cuceu Jul 13 '16 at 08:42
  • Possible duplicate of [How do I install sqlite3 for Ruby on Windows?](http://stackoverflow.com/questions/15480381/how-do-i-install-sqlite3-for-ruby-on-windows) – Vucko Jul 13 '16 at 08:44
  • @M.Karim I use Windows. Looks like sqlite3 doesn't exist or something – Razvan Cuceu Jul 13 '16 at 08:44
  • Errors like that seem to revolve around not having the right compiler environment available. Microsoft is working to address how terrible their command-line development environment is with Windows 10 and support for Ubuntu native binaries, giving it a wealth of tools it's currently missing, but until then you've got to look for the proper procedure for installing that particular gem on Windows. – tadman Jul 13 '16 at 08:46
  • @RazvanCuceu, please install sqlite3 in windows. It should solve it. – M. Karim Jul 13 '16 at 08:51
  • Follow below link, http://stackoverflow.com/questions/17643897/cannot-load-such-file-sqlite3-sqlite3-native-loaderror-on-ruby-on-rails May this will helps you. – Hardik Upadhyay Jul 13 '16 at 08:57

0 Answers0