我试图得到一个简单的教程应用程序,并运行与Rails,但已经遇到了这个问题几乎马上。我创建了新的ruby应用程序,cd
到目录并运行rake db:create
。我得到如下
Please install the sqlite3 adapter: 'gem install activerecord-sqlite3-adapter' (sqlite3 is not part of the bundle. Add it to the Gemfile.)
但我确实有gem添加到Gemfile,像这样:
gem 'sqlite3'
另外,当我尝试gem安装适配器时,我得到一个输出,说它不存在于任何存储库中。这是我第一次使用rails,关于如何解决这个问题的任何想法?
*编辑gem install activerecord-sqlite3-adapter
产生以下内容:
Error: Could not find a valid gem 'activerecord-sqlite3-adapter' in any repository.
它提供了一些替代方案,其中只有一个是sqlite3。它被称为activerecord-jdbcsqlite3-adapter
。这可能是我需要的吗?
感谢大家的意见。我从来没有能够解决这个问题,最终只是使用Rails安装程序代替。简单多了,只需确保删除所有以前版本的Rails、Ruby、Gems等。然后使用安装程序