I'm new to Rails, and I'm learning it from The Ruby on Rails Tutorial.
The bundle install
command shows this error when I use gem 'sqlite3'
in Gemfile;
An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
sqlite3
I found a solution to this over here - https://medium.com/@declancronje/installing-and-troubleshooting-ruby-on-rails-sqlite3-windows-10-fix-87c8886d03b, that suggested that gem 'sqlite3'
should be replaced with gem ‘sqlite3’, git: “https://github.com/larskanis/sqlite3-ruby", branch: “add-gemspec”
. On running bundle install
after upating Gemfile, all the required gems, including sqlite3, appear to have installed;
Bundle complete! 15 Gemfile dependencies, 70 gems now installed.
Use 'bundle info [gemname]' to see where a bundled gem is installed.
But on running the command sqlite3 --version
, I still get the error message that says
'sqlite3' is not recognized as an internal or external command,
operable program or batch file.
I have also referred to various stackoverflow answers, but none of them seem to work. gem install sqlite3
is also not working.
Please help.