- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经在 nitrous.io 上成功创建了应用程序并为该应用程序初始化了 postgres 数据库。我现在正在尝试为同一个盒子上的第二个应用程序配置数据库。
当我为新应用程序运行 bundle exec rake db:create 时,我收到以下错误消息
rake aborted!<br/>
development database is not configured
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:39:in `resolve_string_connection'<br/>
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'<br/>
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'<br/>
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:63:in `block (2 levels) in <top (required)>'<br/>
Tasks: TOP => db:create<br/>
(See full trace by running task with --trace)
如果我运行 bundle exec rake db:create:all,我会收到以下错误消息:
那么创建数据库的正确方法是什么?
rake aborted!<br/>
undefined method `[]' for nil:NilClass<br/>
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:50:in `block (4 levels) in <top (required)>'<br/>
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:38:in `each_value'<br/>
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:38:in `block (3 levels) in <top (required)>'<br/>
Tasks: TOP => db:create:all<br/>
(See full trace by running task with --trace
我的db/database.yml文件如下:
# database configuration for Nitrous.io
development:
adapter: postgresql
encoding: unicode
database: better_life-dev
pool: 5
host: localhost
username: action
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
# The TCP port the server listens on. Defaults to 5432.
# If your server runs on a different port number, change accordingly.
#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
# Defaults to warning.
#min_messages: notice
# 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
database: better_life-test
pool: 5
host: localhost
username: action
password:
production:
adapter: postgresql
encoding: unicode
database: better_life-prod
pool: 5
host: localhost
username: action
password:
最佳答案
您需要确保为您的 config/database.yml
文件缩进每个设置两个空格。尝试使用具有确切格式的这些设置:
development:
adapter: postgresql
encoding: unicode
database: better_life-dev
pool: 5
host: localhost
username: action
password:
test:
adapter: postgresql
database: better_life-test
pool: 5
host: localhost
username: action
password:
production:
adapter: postgresql
encoding: unicode
database: better_life-prod
pool: 5
host: localhost
username: action
password:
关于ruby-on-rails - 无法在 Nitrous.io 上创建数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25859556/
有没有办法在氮气盒的控制台中配置鼠标灵敏度?我注意到它在带有魔术鼠标的 Mac 上极其敏感。当尝试查看需要在控制台中滚动的测试输出(或任何内容)时,它会变得令人沮丧。 最佳答案 我还没有找到通过网络界
当我第一次启动它时,我无法让 Nitrous IO 桌面将我在服务器上的远程文件下载到我的机器中。 我刚刚下载了 Nitrous io 桌面,登录,查看了我的盒子,但是当我打开“文件同步”时,它只显示
当我第一次启动它时,我无法让 Nitrous IO 桌面将我在服务器上的远程文件下载到我的机器中。 我刚刚下载了 Nitrous io 桌面,登录,查看了我的盒子,但是当我打开“文件同步”时,它只显示
是否可以在 Nitrous.io 上的标准端口 80 启动我的 webserver/webrick/node.js?很多公司政策不允许浏览非标准端口网站。 我可以拥有虚拟机的 root 访问权限吗?
在 Nitrous.io VM 上设置 Mono 框架的最简单方法是什么? Nitrous.io 有 Autoparts 包管理器,但它还不包含 Mono 包。 最佳答案 我想你必须自己为 Mono
我在 nitrous.io 上制作了一个 ruby web 应用程序,这个工具非常好,它帮了很多但现在我想在我的电脑上下载那个项目,但我没有找到任何选项... 最佳答案 您可以通过以下任一选项下载
有任何想法吗?我试过使用: chsh -s /bin/zsh 但是我尝试过的任何密码都失败了。 最佳答案 您不能在主控制台中使用 zsh,因为您没有 root 访问权限,但您可以将 zsh 与 tmu
我有一个 nitrous.io rails box,我和我团队中的其他人正在使用它来开发一个开源的非营利应用程序。有时盒子会自动关闭,这很好,但我想让团队中的其他人在这些情况下能够重新打开它,这样他们
我希望从 Meteor 应用程序中的文件中读取文本。 我正在使用Nitrous.io 该应用程序名为“myApp”,我使用以下代码: var data = Assets.getText('myApp/
我已经在 nitrous.io 上成功创建了应用程序并为该应用程序初始化了 postgres 数据库。我现在正在尝试为同一个盒子上的第二个应用程序配置数据库。 当我为新应用程序运行 bundle ex
我在 nitrous.io 机器上安装 MySQL 时遇到问题。我运行 parts install MySQL 命令但出现以下错误: Installing MySQL system table
我已经使用 autoparts 按照 nitrous.io 上的说明安装了 MySQL。安装并运行后,是否可以使用本地 MySQL 工作台连接到安装在该 nitrous.io 环境中的 MySQL 服
我正在 nitrous.io 盒子上运行 Node.js 教程中的所有示例。其中之一是一个简单的回显服务器: var net = require('net'); var server = net.cr
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于 Stack Overflow 来说是偏离主题的,
我对 Python、Nitrous.IO、MongoDB 和一般命令行相当陌生,因此如果可能的话,希望在这里得到一些指导。 我正在尝试在我的 Nitrous.IO 盒子上安装 pymongo,但似乎找
我有一个 Rails 应用程序,我正在使用 nitrous.io box 来开发它。我正在尝试运行我的 cucumber 功能,但由于未安装 firefox 而出现错误。我尝试安装 firefox,但
我正在尝试Nitrous.io ——这是一个非常好的工具。我还使用 Nitrous 的 Mac 应用程序,它将盒子内容同步到本地目录 - 但我注意到它不同步 .git 目录。我认为这是故意的(?)。是
我正在尝试将 Ungit 与我在 Nitrous 盒子上的 github 存储库一起使用。我正在尝试找出路径应该是什么。 例如 - 我的 github 存储库位于 ~/learn-rails - 所以
我正在尝试在 Nitrous.io 上使用 Elasticsearch。 我正在关注this tutorial但是当尝试重新索引模型时,我收到此错误 action@learning-rails-186
我正在使用云 IDE nitrous.io 开发一个 php 应用程序,我想问一下是否可以使用预览菜单预览我的应用程序? 感谢您的帮助。 最佳答案 编辑:PHP 现在可在 Nitrous.IO 上使用
我是一名优秀的程序员,十分优秀!