ruby on rails - 'require': can not load such file -- sqlite3/sqlite3_native (LoadError) -


getting error while learning tutorial site.

http://ruby.railstutorial.org/chapters/a-demo-app#sec-demo_users_resource

tried run rails command on windows

rails generate scaffold user name:string email:string

and getting such error as:

> .../lib/sqlite3.rb:6:in 'require':cannot load such file -- sqlite3/sqlite3_native(loaderror) >../lib/sqlite3.rb:2:in rescue in <top(required) > >../bundler/runtime.rb:72:in 'require' >.../bundler/runtime.rb:72:in block (2 level) >from bin/rails:4: in 'require' >from bin/rails:4: in <main> 

i have tried other answers adding directory of sqlite path..(its there c:\railsinstaller\ruby2.0.0\lib\ruby\gems\2.0.0\gems\sqlite3-1.3.7-x86-mingw32)..

sqlite3(1.3.7-x86-mingw32 )is there in gem list still getting error. have tried put sqlite3ext.h , sqlite3.h /ext folder not working

tried command gem install sqlite3 --platform=ruby -- --with-sqlite3-dir=c:/path/to/sqlite3 no results

here content of database.yml here database.yml file contents

# sqlite version 3.x #   gem install sqlite3 # #   ensure sqlite 3 gem defined in gemfile #   gem 'sqlite3' development:   adapter: sqlite3   database: db/development.sqlite3   pool: 5   timeout: 5000  # warning: database defined "test" erased , # re-generated development database when run "rake". # not set db same development or production. test:   adapter: sqlite3   database: db/test.sqlite3   pool: 5   timeout: 5000  production:   adapter: sqlite3   database: db/production.sqlite3   pool: 5   timeout: 5000 

update: adviced 1 user me " you'll run several problems frustrating purely because on windows. if can't remove windows, download virtual box , use linux distro on it. make life easier you." switching linux resolved everything. https://stackoverflow.com/users/1092260/althaf-hameez advice.

see https://stackoverflow.com/a/16748607/2466276.

my actions:
1. download http://packages.openknapsack.org/sqlite/sqlite-3.7.15.2-x86-windows.tar.lzma
2. unpack c:\knapsack\x86
3. gem uninstall sqlite3
4. gem install sqlite3 --platform=ruby -- --with-opt-dir=c:/knapsack/x86


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -