Rails 初次启动 Rails 服务报错~~~~求助

galenzx · February 28, 2019 · Last by flowerwrong replied at March 01, 2019 · 1624 hits

本来想入坑学习下 rails server 谢谢网站,,没想到 一入深识海,各种报错都来了!!! 版本 ruby 2.6 版本 rails 5.2.2 版本

project on  master [?] is 📦 ⚠ via ⬢ v11.1.0 via 💎 ruby-2.6.0
➜ rails server
=> Booting Puma
=> Rails 5.2.2 application starting in development
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.0 (ruby 2.6.0-p0), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop

打开 http://127.0.0.1:3000/ 又来一个报错!!

Puma caught this error: Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? can't activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0. Make sure all dependencies are added to Gemfile. (LoadError)

查了一下

gem list

sqlite3 (1.4.0)
sqlite3-ruby (1.3.3)

求助何解啊,google 查看了很多没找到办法!!!

Puma caught this error: Error loading the 'sqlite3' Active Record adapter. 
Missing a gem it depends on? can't activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0. Make sure all dependencies are added to Gemfile. (LoadError)

求助 解决方案

Reply to galenzx

我昨天刚 google 这个问题,你把报错信息丢到 google, 第一个结果好像就是

Reply to Awlter1

试过没用

gem uninstall sqlite3 bundle install

gemfile,sqlite 版本改成 1.3.6

Reply to Oxidation

大佬 怎么更改啊

Reply to bobo
Could not find sqlite3-1.4.0 in any of the sources
Run `bundle install` to install missing gems.

又需要

gem 'sqlite3', '~> 1.3', '< 1.4'

galenzx closed this topic. 01 Mar 10:42
You need to Sign in before reply, if you don't have an account, please Sign up first.