简体   繁体   中英

Rails can't install gem sqlite

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.

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.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM