2012-10-19 56 views
0

我已經從bitbucket和源代碼樹中克隆了一個ruby on rails項目。當我嘗試運行該項目,使用rails服務器時,出現以下錯誤運行克隆的紅寶石項目的錯誤

rails server 
=> Booting WEBrick 
=> Rails 3.0.10 application starting in development on http://0.0.0.0:3000 
=> Call with -d to detach 
=> Ctrl-C to shutdown server 
Exiting 
/Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties- 3.0.10/lib/rails/application/configuration.rb:88:in `read': No such file or directory -  /Users/xyz/newderbywire/config/database.yml (Errno::ENOENT) 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/application/configuration.rb:88:in `database_configuration' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.0.10/lib/active_record/railtie.rb:58:in `block (2 levels) in <class:Railtie>' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/lazy_load_hooks.rb:26:in `on_load' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.0.10/lib/active_record/railtie.rb:57:in `block in <class:Railtie>' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/initializable.rb:25:in `instance_exec' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/initializable.rb:25:in `run' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/initializable.rb:50:in `block in run_initializers' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/initializable.rb:49:in `each' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/initializable.rb:49:in `run_initializers' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/application.rb:134:in `initialize!' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/application.rb:77:in `method_missing' 
from /Users/xyz/newderbywire/config/environment.rb:5:in `<top (required)>' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `block in require' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225:in `block in load_dependency' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:593:in `new_constants_in' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225:in `load_dependency' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require' 
from /Users/xyz/newderbywire/config.ru:3:in `block in <main>' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.5/lib/rack/builder.rb:46:in `instance_eval' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.5/lib/rack/builder.rb:46:in `initialize' 
from /Users/xyz/newderbywire/config.ru:1:in `new' 
from /Users/xyz/newderbywire/config.ru:1:in `<main>' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.5/lib/rack/builder.rb:35:in `eval' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.5/lib/rack/builder.rb:35:in `parse_file' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.5/lib/rack/server.rb:162:in `app' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.5/lib/rack/server.rb:253:in `wrapped_app' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.5/lib/rack/server.rb:204:in `start' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/commands/server.rb:65:in `start' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/commands.rb:30:in `block in <top (required)>' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/commands.rb:27:in `tap' 
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/commands.rb:27:in `<top (required)>' 
from script/rails:6:in `require' 
from script/rails:6:in `<main>' 

有誰能告訴我可能是什麼問題?

+0

是否存在'/ Users/xyz/newderbywire/config/database.yml'? –

回答

0

Ruby on Rails應用程序與大多數Web應用程序一樣,通常由數據庫支持。您指定如何連接到<project directory>/config/database.yml文件中的數據庫。由於這種配置通常是特定於特定機器的,因此許多項目不會在公共源代碼樹中包含該文件。

在這種情況下,您需要創建該文件並自行填寫詳細信息。請參閱https://gist.github.com/961978例如針對不同數據庫服務器的database.yml文件。