Ruby on rails 运行ruby服务器时出错

Ruby on rails 运行ruby服务器时出错,ruby-on-rails,ruby,Ruby On Rails,Ruby,我试图在ubuntu 12.04、rails 2.3.11、ruby 1.8.3和gem 1.5.3中运行ruby服务器,并得到这个结果。这是依赖项问题还是配置问题。请帮助我。提前谢谢 root@virinchy-Aspire-4535:~/BBYIDX-2/BBYIDX-master# script/server => Booting WEBrick => Rails 2.3.18 application starting on http:/0.0.0.0:3000 Farad

我试图在ubuntu 12.04、rails 2.3.11、ruby 1.8.3和gem 1.5.3中运行ruby服务器,并得到这个结果。这是依赖项问题还是配置问题。请帮助我。提前谢谢

root@virinchy-Aspire-4535:~/BBYIDX-2/BBYIDX-master# script/server
=> Booting WEBrick
=> Rails 2.3.18 application starting on http:/0.0.0.0:3000


Faraday: you may want to install system_timer for reliable timeouts
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/postgresql_adapter.rb:941:in `initialize':     
这里有什么我需要修理的吗

FATAL:  role "bbyidx" does not exist (PGError)
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/postgresql_adapter.rb:941:in `connect'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/postgresql_adapter.rb:941:in `connect'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/postgresql_adapter.rb:217:in `initialize'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `new'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in    `postgresql_connection'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in    `new_connection'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in   `checkout_new_connection'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout'
from /usr/local/rvm/rubies/ruby-1.8.7-p371/lib/ruby/1.8/monitor.rb:242:in `synchronize'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in   `retrieve_connection'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in    `retrieve_connection'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in    `connection'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/base.rb:1299:in `table_exists?'
from /home/virinchy/BBYIDX-2/BBYIDX-master/app/models/user.rb:73
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:406:in `load_without_new_constant_marking'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:406:in `load_file'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:547:in `new_constants_in'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:405:in `load_file'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:285:in `require_or_load'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:451:in `load_missing_constant'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:106:in `const_missing'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:118:in `const_missing'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/inflector.rb:364:in `constantize'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/inflector.rb:363:in `each'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/inflector.rb:363:in `constantize'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/core_ext/string/inflections.rb:162:in `constantize'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/observer.rb:157:in `observed_class'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/observer.rb:183:in `observed_classes'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/observer.rb:166:in `initialize'
from /usr/local/rvm/rubies/ruby-1.8.7-p371/lib/ruby/1.8/singleton.rb:94:in `new'
from /usr/local/rvm/rubies/ruby-1.8.7-p371/lib/ruby/1.8/singleton.rb:94:in `instance'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/observer.rb:38:in `instantiate_observers'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/observer.rb:36:in `each'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activerecord-2.3.18/lib/active_record/observer.rb:36:in `instantiate_observers'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/actionpack-2.3.18/lib/action_controller/dispatcher.rb:15:in `define_dispatcher_callbacks'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/callbacks.rb:182:in `call'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/callbacks.rb:182:in `evaluate_method'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/callbacks.rb:166:in `call'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/callbacks.rb:90:in `run'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/callbacks.rb:90:in `each'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/callbacks.rb:90:in `send'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/callbacks.rb:90:in `run'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/callbacks.rb:276:in `run_callbacks'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/actionpack-2.3.18/lib/action_controller/dispatcher.rb:51:in `send'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/actionpack-2.3.18/lib/action_controller/dispatcher.rb:51:in `run_prepare_callbacks'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/rails-2.3.18/lib/initializer.rb:631:in    `prepare_dispatcher'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/rails-2.3.18/lib/initializer.rb:185:in   `process'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/rails-2.3.18/lib/initializer.rb:113:in   `send'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/rails-2.3.18/lib/initializer.rb:113:in `run'

from /home/virinchy/BBYIDX-2/BBYIDX-master/config/environment.rb:22

from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:182:in `require'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:182:in `require'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:547:in `new_constants_in'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:182:in `require'
from /usr/local/rvm/gems/ruby-1.8.7-p371/gems/rails-2.3.18/lib/commands/server.rb:84
from script/server:3:in `require'
from script/server:3
这是你的问题:

FATAL:  role "bbyidx" does not exist (PGError)
您正试图使用不存在的角色连接到PostgreSQL数据库。您可以在终端中使用
createuser
命令创建此角色

createuser bbyidx

谢谢Ryan。但这不起作用。它提示成为超级用户,现在错误是“数据库”bbyidx_dev“不存在”“如何解决此问题?@user2295369:您需要运行
rake db:create