Windows/Ruby/Rails install --- .cannot load such file -- sqlite3/sqlite3_native windows
fortunately, you don't have to switch to ruby 2.0
there is a solution to this issue, after endless trying...
https://github.com/hwding/sqlite3-ruby-win
Steps
Pre
gem uninstall sqlite3 --all
Source
- Download the latest sqlite3-ruby, https://github.com/sparklemotion/sqlite3-ruby
- unzip the package
Build
- run command-line in the extracted dir
- make sure you have your C compiler installed and added to PATH
gem install bundler
bundle install
rake native gem
- you'll find a dir named 'pkg' generated
Install
- enter dir 'pkg'
gem install --local sqlite3-xxx.gem
('xxx' is version code)
Check
irb
require 'sqlite3'
The issue is that binary sqlite3 gem do not include pre-compiled versions for Ruby 2.1.3
This is mentioned in the sqlite3-ruby mailing list here.
In the folder of your project open terminal and execute:
bundle update sqlite3
bundle update nokogiri
I hope i have helped you ;)
EDIT:
i always recommend using linux/mac for ruby, because some gems may get problematic, because of compiling errors with
c
always use bundle to manage your gems, it is much easier*, you can install it by:
gem install bundler
bundle install
- will install all the gems in yourGemfile
the last
bundler
version is not compatible withe ruby bellow 2.3, so usegem install bundler -v 1.16.4