-2

Gem files will remain installed in C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/sqlite3-1.4.0 for inspection. Results logged to C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/sqlite3-1.4.0/gem_make.out

An error occurred while installing sqlite3 (1.4.0), and Bundler cannot continue. Make sure that gem install sqlite3 -v '1.4.0' succeeds before bundling.

I tried to install earlier version on sqlite, not working. Tried one of the solutions from stackoverflow :

gem 'sqlite3', '~> 1.3.6'

getting this error ERROR: While executing gem ... (Gem::CommandLineError) Unknown command sqlite3,

Please help i'm new in Rails , this is my first project in rails.

3 Answers3

0

Add gem 'sqlite3' to Gemfile in the root directory of your rails project. Then run bundle install and it should install sqlite and make it available to use in your rails project.

amit_saxena
  • 7,450
  • 5
  • 49
  • 64
0

Specify git and branch for the gem sqlite3 in your Gemfile should fix the problem.

gem 'sqlite3', git: "https://github.com/larskanis/sqlite3-ruby", branch: "add-gemspec"

For more info https://medium.com/@declancronje/installing-and-troubleshooting-ruby-on-rails-sqlite3-windows-10-fix-87c8886d03b

cannot load such file — sqlite3/sqlite3_native (LoadError) Ruby on Rails

worrawut
  • 958
  • 10
  • 17
0

Replace gem 'sqlite3' with gem 'sqlite3', '~> 1.3.11' which is in Gemfile in the root directory of your rails project. Then run bundle install.

  • This would be better as a comment because it's still unclear as to whether downgrading the gem would be a solution – mdp Nov 18 '20 at 20:06