- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
你好,我正在尝试在 ruby on rails 应用程序中创建一个数据库,但我遇到了这个错误
FATAL: role "giovanni" does not exist
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:661:in `rescue in connect'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `connect'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:436:in `new_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:446:in `checkout_new_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
/usr/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
/usr/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:565:in `retrieve_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_handling.rb:87:in `connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/postgresql_database_tasks.rb:8:in `connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/postgresql_database_tasks.rb:17:in `create'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:93:in `create'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:107:in `block in create_current'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:275:in `block in each_current_configuration'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:274:in `each'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:274:in `each_current_configuration'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:106:in `create_current'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/railties/databases.rake:17:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/var/lib/gems/2.1.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "pool"=>5, "database"=>"app_angular_rails_development"}
FATAL: role "giovanni" does not exist
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:661:in `rescue in connect'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `connect'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:436:in `new_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:446:in `checkout_new_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
/usr/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
/usr/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:565:in `retrieve_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_handling.rb:87:in `connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/postgresql_database_tasks.rb:8:in `connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/postgresql_database_tasks.rb:17:in `create'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:93:in `create'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:107:in `block in create_current'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:275:in `block in each_current_configuration'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:274:in `each'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:274:in `each_current_configuration'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:106:in `create_current'
/var/lib/gems/2.1.0/gems/activerecord-4.2.0/lib/active_record/railties/databases.rake:17:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/var/lib/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/var/lib/gems/2.1.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "pool"=>5, "database"=>"app_angular_rails_test"}
我的本地计算机中似乎没有名为“giovanni”的角色,所以我尝试通过登录 postgresql 控制台并插入创建一个用户的查询来创建一个角色:
sudo -u postgress -i
CREATE ROLE giovanni WITH PASSWORD 'password' CREATEDB LOGIN CREATEROLE CREATEUSER SUPERUSER;
但我收到这个错误:
ERROR: conflicting or redundant options
我尝试按照数据库的官方文档以其他方式重写此查询,但没有成功
最佳答案
您可以尝试使用 createuser
创建用户程序,它具有与 CREATE ROLE
相同的功能(实际上,它调用此命令)但可以从命令 shell 运行。
$ createuser giovanni
Shall the new role be a superuser? (y/n) y
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) y
CREATE USER
或使用命令行
选项:
$ createuser -P -s -e giovanni
Enter password for new role: xyzzy
Enter it again: xyzzy
CREATE ROLE giovanni PASSWORD 'xyzzy' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
CREATE ROLE
关于ruby-on-rails - Postgresql - 无法创建角色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31203380/
抱歉,问题标题含糊不清!我有一个 ASP.NET 应用程序,可与其他第三方软件配合使用(Burning Glass - 通过 tcp/ip 连接到 Web 应用程序,需要 - 正确配置的 dns 条目
我正在开展一个项目,将一个大型网站分解为更小、更具体的网站。我需要能够将对这些网站的访问限制为仅具有必要权限的用户,并且希望尽可能利用现有的成员资格/角色数据模型。 因此,理想情况下,我想将潜在的多个
抱歉,问题标题含糊不清!我有一个 ASP.NET 应用程序,可与其他第三方软件配合使用(Burning Glass - 通过 tcp/ip 连接到 Web 应用程序,需要 - 正确配置的 dns 条目
我对 FOSUserBundle 中的角色有点困惑。用户实体也有角色列,我们可以通过它为用户分配多个角色。根据发布在 Managing users/roles/groups in FOSUserBun
原谅我的新手问题,但我想按顺序执行三个任务并在剧本中使用两个角色: 任务 角色 任务 角色 任务 这是我到目前为止(任务,角色,任务): --- - name: Task Role Task ho
在触发器中,我想检查哪些角色对 USER() 有效,而不是 CURRENT_USER()。(认识到 CURRENT_USER() 返回触发器的 DEFINER)。 是否有任何类型的 USER_ROLE
我有一套Ansible playbooks 和主要的 yml 文件是这样的 - hosts: all roles: - common - install_nginx 我想在触发剧本
因此,我有以下代码输出安装的所有功能和角色: Import-Module ServerManager $Arr = Get-WindowsFeature | Where-Object {$_.Inst
我已经寻找了一段时间,并且已经手动完成了角色和权限的许多部署,但是有什么方法可以在Sitecore中为角色/权限创建一个程序包(或等效程序包)? 当您没有选择从一个环境到另一个环境进行完全部署时,使用
我想找到或创建一个与所有者或至少贡献者具有相同功能的 azure 角色。但此角色不应该有权创建 azure 资源。 我一直在浏览现有的预定义角色。 最佳答案 这在 Azure RBAC 上下文中没有任
我在文档中找不到答案,也找不到示例:是否可以在 role/defaults/ 中命名除 main.yml 之外的文件?我的意思是,main.yml 是具有默认值的文件的唯一有效名称吗? 最佳答案 根据
我尝试了kubectl get sa default命令,但只看到一些非常基本的值。在k8s中查看与特定服务帐户关联的权限/角色的命令是什么? 最佳答案 以下命令可能会有所帮助。它基本上获得RoleB
有没有办法告诉 Spring 在我制作的自定义用户 bean 中找到用户的角色? http://static.springsource.org/sprin...ns-config.html 因此,如果
在我的 playbook 中运行几次 Play 后,我想验证我的应用程序的部署。 在我的角色之一中,我有以下任务,将创建的 ec2 实例添加到“已启动”的主机: - name: Add new ins
我按如下方式将用户添加到角色(请注意,我在我的机器上运行下面显示的代码): Roles.AddUserToRole(oMU.UserName, "Role1"); 使用以下代码我检查用户是否在
我目前在为 postgresql 创建角色时遇到问题,这是我已经做过的,但自昨晚以来取得了任何进展 simplybel@simplybel:~$ sudo -u postgres createuser
一个项目现在有超过 200 个类,每个文件一个类,将它们划分到目录中似乎是恰当的。现在我正在考虑两种不同的策略; a) 按角色或层分组 repositories/ UserRepository
您如何为用户、角色和应用特定实体提供种子?似乎 IdentityModel 以它自己的上下文为目标? internal sealed class Configuration : DbMigration
摩尔庄园手游在六一儿童节上线之后,网上的争议声还是很多的,有夸赞的,称其找回了童年的回忆,也有吐槽的,觉得3d的设计很晕,没有以前的感觉,想要删除账号,那么大家知道怎么去注销吗,步骤流程是什么样的?
在 XP SP2 虚拟机中运行 Oracle 11gR1。完全披露:这是一项任务。 我试图在用户被授予 DBA 角色时进行审计,并在事件发生时发送电子邮件。 我相信命令 AUDIT DBA;将审核对
我是一名优秀的程序员,十分优秀!