简体   繁体   English

在Windows上安装Fedena时出错

[英]Error installing Fedena on Windows

I have been trying to install Fedena on Windows and following instructions from http://www.projectfedena.org/install 我一直在尝试在Windows上安装Fedena,并按照http://www.projectfedena.org/install上的说明进行操作

I am stuck on this step: Run the command "rake db:create". 我被困在这一步:运行命令“ rake db:create”。 This will create the required databases. 这将创建所需的数据库。 The database.yml file is as following: database.yml文件如下:

development:
      host: localhost
      adapter: mysql
      database: fedena_ultimate
      port: 3306
      username: root
      password: [redacted]
test: &test
      host: localhost
      adapter: mysql
      database: fedena_two_new
      port: 3306
      username: root
      password: [redacted]
production:
      host: localhost
      adapter: mysql
      database: fedena_ultimate
      port: 3306
      username: root
      password: [redacted]
cucumber:
  <<: *test

I am getting the following error: 我收到以下错误:

rake aborted! 耙子流产了! undefined method `[]' for nil:NilClass nil:NilClass的未定义方法“ []”

(See full trace by running task with --trace) (通过使用--trace运行任务来查看完整的跟踪)

Stack Trace 堆栈跟踪

C:\Fedena\Fedena>rake db:create --trace (in C:/Fedena/Fedena)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
** Execute db:create rake aborted! undefined method `[]' for nil:NilClass
C:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:55:in `create_database'
C:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:31
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' 
C:/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/Ruby187/bin/rake:19:in `load' 
C:/Ruby187/bin/rake:19

Double-check the format of your database.yml; 仔细检查数据库的格式。 It should only be indented using two spaces, not four. 只能使用两个空格而不是四个缩进。

The stack-trace suggests that it can't find the 'adapter' key of your configuration; 堆栈跟踪表明它找不到您的配置的“适配器”键。 the mis-formatted YAML may be contributing to that. 格式错误的YAML可能是造成这种情况的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM