gem install 和 bundle install 无法安装 sqlite3

问题描述

我是 Rails 的新手,我是从 Ruby on Rails 教程中学习的。 当我在 Gemfile 中使用 bundle install 时,gem 'sqlite3' 命令显示此错误;

    An error occurred while installing sqlite3 (1.4.2),and Bundler cannot continue.
    Make sure that `gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/'`
    succeeds before bundling.

In Gemfile:
  sqlite3

我在这里找到了解决方案 - https://medium.com/@declancronje/installing-and-troubleshooting-ruby-on-rails-sqlite3-windows-10-fix-87c8886d03b,建议将 gem 'sqlite3' 替换为 gem ‘sqlite3’,git: “https://github.com/larskanis/sqlite3-ruby",branch: “add-gemspec”。在升级 Gemfile 后运行 bundle install 时,所有必需的 gem,包括 sqlite3,似乎都已安装;

Bundle complete! 15 Gemfile dependencies,70 gems now installed.
Use 'bundle info [gemname]' to see where a bundled gem is installed.

但是在运行命令 sqlite3 --version 时,我仍然收到错误消息

'sqlite3' is not recognized as an internal or external command,operable program or batch file.

我还提到了各种 stackoverflow 答案,但似乎没有一个有效。 gem install sqlite3 也不起作用。 请帮忙。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...