如何配置PostgreSQL与rails项目? [英] How to configure Postgresql with rails project?

查看:116
本文介绍了如何配置PostgreSQL与rails项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是ruby的新手。我试图运行 BBYIDX ,然后按如何在Windows上安装BBYIDX?

I am very new to ruby. I am trying to run BBYIDX and followed How to install BBYIDX on Windows?

当我尝试 rake db:migrate 时,它会再现

(in /home/virinchy/BBYIDX-2/BBYIDX-master)  
DEPRECATION WARNING: Rake tasks in vendor/plugins/acts_as_tsearch/tasks,   vendor/plugins/acts_as_tsearch/tasks, vendor/plugins/delayed_job/tasks,   vendor/plugins/nested_scenarios/tasks, vendor/plugins/rails-authorization-plugin/tasks, and   vendor/plugins/rails_rcov/tasks are deprecated. Use lib/tasks instead. (called from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/rails-2.3.11/lib/tasks/rails.rb:10)  
rake aborted!  
FATAL:  password authentication failed for user "bbyidx"  
FATAL:  password authentication failed for user "bbyidx"
Bundle install was succesful with message as:Your bundle is complete!  
Use `bundle show [gemname]` to see where a bundled gem is installed. 

但是 rake db:migrate 。我运行 ubuntu 12.04 ruby​​-1.8.7 rails- / code>和 gem 1.5.3


提前感谢。

How do i solve this? Thanks in advance.

推荐答案

您为 postgres user?

在您的 config / database.yml 中,您应该正确设置数据库:

In your config/database.yml you should have your databases set up properly:

development:
  adapter: postgresql
  encoding: unicode
  database: your_app_development # name your development app something
  host: localhost
  pool: 5
  username: your_username
  password: your_password # or leave blank if you didn't set a password

test:
  adapter: postgresql
  encoding: unicode
  database: your_app_test
  host: localhost
  pool: 5
  username: your_username
  password: your_password

这篇关于如何配置PostgreSQL与rails项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆