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

galenzx · 2019年02月28日 · 最后由 flowerwrong 回复于 2019年03月01日 · 1728 次阅读

本来想入坑学习下 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)

求助 解决方案

对 galenzx 回复

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

对 Awlter1 回复

试过没用

gem uninstall sqlite3 bundle install

gemfile,sqlite 版本改成 1.3.6

对 Oxidation 回复

大佬 怎么更改啊

对 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 关闭了讨论。 03月01日 10:42
需要 登录 后方可回复, 如果你还没有账号请 注册新账号