我尝试在 EC2 实例中运行 Rails 6,但遇到以下错误:
Your version of SQLite (3.7.17) is too old. Active Record supports SQLite >= 3.8.
如果重要的话:
- 我的 gem 文件中有以下内容:gem 'sqlite3', '~> 1.4
- 我正在使用以下命令:rvmsudo rails server -p 80 -b 0.0.0.0
- 当我跑步时rails s
在本地我没有遇到这个问题。
这是同样的问题here https://stackoverflow.com/questions/56086629/error-your-version-of-sqlite-3-7-17-is-too-old-active-record-supports-sqlite,但所选答案特定于使用 AWS Cloud9。
EDIT:
下面是运行后的结果sudo yum install build-essential libsqlite3-dev sqlite3 software-properties-common
:
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
No package build-essential available.
No package libsqlite3-dev available.
No package sqlite3 available.
No package software-properties-common available.
Error: Nothing to do
这是运行后的结果sudo yum install libsqlite3-dev
and sudo yum install sqlite3
, 分别:
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
No package libsqlite3-dev available.
Error: Nothing to do
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
No package sqlite3 available.
Error: Nothing to do
EDIT 2:
跑步时rails db:migrate
我看到这个:
warning Skipping preferred cache folder "/home/ec2-user/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
** Execute db:load_config
** Execute db:migrate
rails aborted!
Your version of SQLite (3.7.17) is too old. Active Record supports SQLite >= 3.8