Rails 5でMongoDBを設定しようとしています。Clouditeを使用しています。私はそれにいくつか問題があります。私はMongoDBをインストールしてそれを私のgemファイルに追加しました。Rails 5とMongoDB:データベースアダプタ用に 'sqlite3'が指定されていますが、gemがロードされていません
私は
rails g mongoid:config
を実行すると、私はエラーを取得する:ここで
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)
は、私がどのように再書き込み、このためにはよく分からないdatabase.ymlの
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
#
default: &default
adapter: sqlite3
pool: 5
timeout: 5000
development:
<<: *default
database: db/development.sqlite3
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: db/test.sqlite3
production:
<<: *default
database: db/production.sqlite3
ですMongoDB?私はあなたがこれを行うことが、私はまたのActiveRecordを削除したり、無効にする必要がありますが、私はRailsの5に
私は生成されたアプリを削除しようとしましたが、Cloud9ではあまりうまく動かないようです。私は端末からファイルを削除しました(ファイルツリー経由ではできません)。それはもうターミナルにはありませんが、私はそれをリフレッシュした後でもファイルツリーに残っています。私が新しいアプリケーションを作成したとき、それはファイルツリーにも表示されませんでした。私は、既存のアプリケーションからActiveRecordを削除する方が良いと思う。 – xeno7
実際には、ワークスペースフォルダ自体ではなく、ワークスペースフォルダのすべての内容を削除するだけです。これはうまくいくはずです。 – xeno7