I am following rails tutorial https://www.railstutorial.org/book/toy_app and am running into an error when I run this $ rails generate scaffold User name:string email:string
Here is the error:
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x86-mingw32/l
ib/sqlite3.rb:6:in 'require': cannot load such file -- sqlite3/sqlite3_native (L
oadError)
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-
x86-mingw32/lib/sqlite3.rb:6:in 'rescue in <top (required)>'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-
x86-mingw32/lib/sqlite3.rb:2:in '<top (required)>'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/
lib/bundler/runtime.rb:76:in 'require'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/
lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/
lib/bundler/runtime.rb:72:in 'each'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/
lib/bundler/runtime.rb:72:in 'block in require'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/
lib/bundler/runtime.rb:61:in 'each'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/
lib/bundler/runtime.rb:61:in 'require'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/
lib/bundler.rb:133:in 'require'
from c:/sites/workspace/toy_app/config/application.rb:7:in '<top (requir
ed)>'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.0
/lib/rails/commands/commands_tasks.rb:141:in 'require'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.0
/lib/rails/commands/commands_tasks.rb:141:in 'require_application_and_environmen
t!'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.0
/lib/rails/commands/commands_tasks.rb:128:in 'generate_or_destroy'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.0
/lib/rails/commands/commands_tasks.rb:50:in 'generate'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.0
/lib/rails/commands/commands_tasks.rb:39:in 'run_command!'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.0
/lib/rails/commands.rb:17:in '<top (required)>'
from bin/rails:4:in 'require'
from bin/rails:4:in '<main>'
I am using Windows 8. I am using Gitbash. I installed ruby and rails from the install rails website. When I type ruby -v I get ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]
I tried the solution offered here but it didn't work. Any ideas?
sqlite --version
I getsh.exe": sqlite: command not found
. How do I install it? – Saniesgem 'gem 'sqlite3', '1.3.9'
undergroup :development, :test
in your Gemfile (and that you ranbundle install --without production
). – Dollydolmanirb(main):001:0> require 'sqlite3' => true irb(main):002:0> SQLite3::SQLITE_VERSION => "3.8.7.1" irb(main):003:0> exit
– Sanies