【发布时间】:2022-01-21 11:44:05
【问题描述】:
怎么样了? 我尝试使用 Ruby on Rails 创建我的第一个应用程序,我可以创建项目但无法运行服务器。 我的操作系统是 Windows。 我安装了 Node、Yarn、Ruby、Rails、Sqlite3。 当我尝试运行“rails s”时出现此消息
Could not find gem 'sqlite3' in locally installed gems.
Run `bundle install` to install missing gems.
我运行命令“bundle install”、“bundle update”但不起作用。当我运行“捆绑安装”时出现此消息:
An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue.
In Gemfile:
sqlite3
当我验证 sqlite3 的版本时: enter image description here 我尝试编辑 Gemfile:
gem 'sqlite3', '~> 1.4.2'
并尝试以这种方式安装:
gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/'
我也尝试了以下步骤: https://www.youtube.com/watch?v=cAseoJeNG8I
我遵循 windows 用户文档中的建议并在 Bash 上运行“bin/rails s”,但仍然出现同样的问题。 我在这里阅读了类似问题的其他答案,但没有帮助我,为此我提出了这个问题。 如果您有什么遗漏的问题,请告诉我,我会提供信息。 谢谢大家。
【问题讨论】:
标签: ruby-on-rails windows