When I try to setup basic installation and initiation of server using Rails 4.0.0 on Ruby 2.0.0, I\'m facing the following error message.
/usr/local/lib/ruby
I had the same error when I upgrade my Ruby version to 2.5.X. I tracked with rails task --trace
that the sqlite3 is not available to version 2.5, than I change my GemFile the gem "sqlite3" change to "sqlite3-ruby", after I uninstall the gem "sqlite3" and finally I run the bundle install
.
I don't know what is the reason... I read that "sqlite3" is not available for ruby 2.5 yet, but I'm not sure.
Updated
Adding the below to the Gemfile fixed for me: gem 'sqlite3', '1.4.0', platforms: :ruby
If the top answer doesn't work, a fix that I discovered is simply going to your Gemfile and adding the version number 1.3.11 (instead of 1.3.9) right after sqlite3. So the line in your Gemfile should now read:
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '1.3.11'
Change your sqlite3 gem in the Gemfile for this:
gem 'sqlite3', git: "https://github.com/larskanis/sqlite3-ruby", branch: "add-gemspec"
Then run:
bundle install
Just edit Gemfile and add gem 'sqlite3', platform: :ruby
.
see:https://stackoverflow.com/a/39136421/6755206
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
gem uninstall sqlite3 --all
gem install bundler
bundle install
rake native gem
gem install --local sqlite3-xxx.gem
('xxx' is version code)irb
require 'sqlite3'