123456789101112131415161718192021222324252627282930313233343536373839 |
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql2
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: test-mysql2_development
pool: 5
username: root
password:
socket: /tmp/mysql.sock
# 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:
adapter: mysql2
encoding: utf8
reconnect: false
database: test-mysql2_test
pool: 5
username: root
password:
socket: /tmp/mysql.sock
production:
adapter: mysql2
encoding: utf8
reconnect: false
database: test-mysql2_production
pool: 5
username: root
password:
socket: /tmp/mysql.sock
|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
# PostgreSQL. Versions 7.4 and 8.x are supported.
#
# Install the pg driver:
# gem install pg
# On Mac OS X with macports:
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
# On Windows:
# gem install pg
# Choose the win32 build.
# Install PostgreSQL and put its /bin directory on your path.
development:
adapter: postgresql
encoding: unicode
database: test-postgres_development
pool: 5
username: test-postgres (or your username if PostgreSQL installed by Homebrew)
password:
# Connect on a TCP socket. Omitted by default since the client uses a
# domain socket that doesn't need configuration. Windows does not have
# domain sockets, so uncomment these lines.
#host: localhost
#port: 5432
# Schema search path. The server defaults to $user,public
#schema_search_path: myapp,sharedapp,public
# Minimum log levels, in increasing order:
# debug5, debug4, debug3, debug2, debug1,
# log, notice, warning, error, fatal, and panic
# The server defaults to notice.
#min_messages: warning
# 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:
adapter: postgresql
encoding: unicode
database: test-postgres_test
pool: 5
username: test-postgres (or your username if PostgreSQL installed by Homebrew)
password:
production:
adapter: postgresql
encoding: unicode
database: test-postgres_production
pool: 5
username: test-postgres
password:
|
12345678910111213141516171819202122 |
# SQLite version 3.x
# gem install sqlite3
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# 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:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
|
come from
https://gist.github.com/erichurst/961978
http://rubyinrails.com/2014/01/database-yml-rails/
相关推荐
梯子 阶梯锦标赛排名网站。... 从示例文件config/database.yml.example创建config/database.yml config/database.yml.example 。 设置数据库。 不要从头开始运行迁移,否则将失败。 bundle exec rake db:se
入门: 从github克隆您的应用程序后: 将config / database.yml.example复制到config / database.yml 将config / application.yml.example复制到config / application.yml 在config / database.yml中设置数据库详细...
链接转储 简单的链接转储Sinatra应用程序(JSON API +基本Web视图) ...开发入门 rvm install . ...cp config/database.yml.example config/database.yml APP_DIR=$PWD CONSOLE_LOG=1 bundle exec puma
设置将config/database.yml.example文件复制到config/database.yml : $ cp config/database.yml.example config/database.yml现在编辑您的config/database.yml使其符合您的开发机器要求,因此添加您的数据库用户名...
$ cp config/database.yml.example config/database.yml $ rake db:setup dev:fake $ rails server 任务 rake dev:fake[model_name,count] dev:fake 为所有模型生成假数据,dev:fake[course,3] 创建 3 个假课程...
欢迎使用iRails 基于Rails 4的项目的简单模板入门$ git clone git://github.com/droidlabs/irails.git myapp $ cd ./myapp $ cp config/database.yml.example config/database.yml 配置您的config / database.yml $ ...
将 config/database.yml.example 重命名为 config/database.yml 并从 Postgresql 添加到 database.yml 用户名和密码 捆绑安装 耙 db:create && 耙 db:migrate 导轨服务器 享受! 执照 在 MIT 下,请参阅许可证
Droidcon波兰 会议网站 主分支 生产部门 ...$ cp config/database.yml.example config/database.yml # Update your username and password for MySQL in config/database.yml file # install gems $ bun
准备安装依赖bundle install yarn install检查配置文件cp config/credentials/development.yml.enc.example config/credentials/development.yml.enc数据库准备cp config/database.yml.example config/database.yml ...
步骤如下: 克隆存储库运行bundle install 创建一个config/database.yml基础上config/database.yml.example 创建一个config/site.yml基于config/site.yml.example 使用rake db:create:all db:migrate设置数据库利润...
cp config/database.yml.example config/database.yml 编辑 config/database.yml 以连接到您的数据库 捆绑安装 耙数据库:创建 耙数据库:迁移 耙分贝:种子 cd public/deps; 安装 导轨 笛卡尔坐标系统,因此每个...
config / database.yml.example config / unicorn.yml.example config / store.yml.example cashier_acct: cashier rpc_port: 9999 rpc_user: user rpc_pass: pass admin_user: # login for store manager ...
将config/database.yml.example复制到config/database.yml并更新它以匹配您的数据库。 将.env.example复制到.env 。 将添加以下键,根据需要更新它们: FLUID_SURVEYS_HOST=charitywater.fluidsurveys.com:443 ...
运行规格要运行规格,您可以运行 bin/setuprspec或者,您也可以为您的环境复制并修改spec/support/database.yml : cp spec/support/database.yml.example spec/support/database.yml[Necessary customization here]...
cp config/database.yml.example config/database.yml rake db:migrate db:test:prepare bundle exec rspec rake db:seed foreman start # navigate to http://localhost:5000 # sidekiq background worker is also ...
GruppeSite系统依赖Ruby 2.6(请参阅Gemfile ) PostgreSQL 11.x(和libpq-dev或同等版本) 节点11.x 纱线1.x 设置应用cp config/database.yml.example config/database.yml # edit as necessary bin/setup配置以下...
BHT EMR API 要求 以下是运行API所必需的: Ruby2.5+ Rails 5.2 ... 将配置文件从config/database.yml.example复制到config/database.yml 。 编辑新文件以指向您的数据库。 $ cp config/database.yml.e
使用您的凭据在config文件夹中创建一个类似于database.yml.example的database.yml 键入rake lp:config创建lamepress.yml,其中包含有关域,标题和布局的信息 输入rake db:create:all创建数据库 键入rake db:schema...
如何使用捆绑安装通过bundle和命令执行创建database.yml cp config/database.yml.default config/database.yml 编辑databse.yml的内容 default: &default adapter: mysql2 encoding: utf8 pool: 5 username: <mysql>...
元冲浪预测 目的 从 , 和 API中数据以显示汇总的冲浪预测。 开发人员设定 使用安装依赖项: brew bundle ... cp config/database.yml.example config/database.yml bin/rails db:setup rvmsudo bin/in