首页 > 解决方案 > 在 AWS 中使用 Cloud9 时未找到 ID 为主要的连接池/Gem::LoadError (sqlite3)

问题描述

我刚刚开始使用 AWS cloud9 ( Rails v.5.0.0, Ruby v.2.6.3, ActiveRecord v.5.0.7.2) 构建一个新的 rails 应用程序。我已经设置了项目目录,但是当我尝试运行服务器时,我得到了No connection pool with id primary found

我的终端中也出现此错误:Gem::LoadError (Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).)

这是我尝试过的

  1. 在 gem 文件 ( gem 'sqlite3', '~> 1.3.11') 和 bundle install 中指定 sqlite3 的版本。
  2. 进入块gem 'sqlite3', '~> 1.3.11':development, :test捆绑安装。
  3. 重新安装 sqlite3 gem 并重复上述操作。

有没有其他人遇到过这个问题?

先感谢您。

标签: ruby-on-railssqliteactiverecordrubygemscloud9-ide

解决方案


推荐阅读