0
私は、Ruby on Railsとユーザー認証のための "Active admin-gem"の簡単なアプリケーションを持っています。私はC9でPostgreSQLデータベースを作成しようとしています。どれもだから私は今のところ持っている私Cloud9とPostgresのRuby on Railアプリケーション
のために動作しない: インストールpostgresの宝石 - 名「MyDatabaseという」 「Ubuntuの」パスワード「Ubuntuの」 ユーザーを生成してデータベースを作成C9 でPostgreSQLを起動 宝石「PG」 Ubuntuは "mydatabase"の所有者です "database.yml"の設定
My datab今ase.yml、しかし、私は他の人と試してみました:私が使用
default: &default
adapter: postgresql
encoding: unicode
host: localhost
pool: 5
database: mydatabase
username: ubuntu
password: ubuntu
development:
<<: *default
test:
<<: *default
production:
<<: *default
エラー:$すくいデシベル:任意の助けに感謝https://github.com/JohnnyBurst/c9_sqlite3_to_pg
:このページを使用して
DEPRECATION WARNING: Passing a string to ActiveRecord::Base.establish_connection for a configuration lookup is deprecated, please pass a symbol (:postgresql) instead. (called from mon_synchronize at /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/monitor.rb:214)
rake aborted!
ActiveRecord::AdapterNotSpecified: 'postgresql' database is not configured. Available: ["default", "adapter", "encoding", "host", "pool", "database", "username", "password", "development", "<<", "test", "production"]
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:248:in `resolve_symbol_connection'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:231:in `resolve_string_connection'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:213:in `resolve_connection'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:139:in `resolve'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:151:in `block in resolve_all'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:150:in `each'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:150:in `resolve_all'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_handling.rb:69:in `resolve'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/core.rb:46:in `configurations='
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/railties/databases.rake:5:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:create => db:load_config
(See full trace by running task with --trace)
イムを作成します。
database.ymlがあなたの投稿とまったく同じように見える場合は、インデントがYMLファイルで最も重要なので、最初に適切なインデントを行うことをお勧めします。あなたはhttps://github.com/Aerogami/guides/wiki/Cloud9-workspace-setup-with-Rails-and-Postgresqlに従って適切な設定を行うことができます – Sajan