- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 Mac 上运行任何帮助将不胜感激。当我尝试启动我的 Rails 服务器时,我收到以下错误:
Richards-MBP:learn-rails richardxxxx$ rails server
=> Booting WEBrick
=> Rails 4.2.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:370:in `parse': (<unknown>): did not find expected key while parsing a block mapping at line 13 column 1 (Psych::SyntaxError)
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:370:in `parse_stream'
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:318:in `parse'
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:245:in `load'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/application.rb:391:in `secrets'
from /Users/richardxxxx/Ruby/learn-rails/config/environments/development.rb:32:in `block in <top (required)>'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/railtie.rb:210:in `instance_eval'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/railtie.rb:210:in `configure'
from /Users/richardxxxx/Ruby/learn-rails/config/environments/development.rb:1:in `<top (required)>'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/engine.rb:598:in `block (2 levels) in <class:Engine>'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/engine.rb:597:in `each'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/engine.rb:597:in `block in <class:Engine>'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:420:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:419:in `block in each_strongly_connected_component_from'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:413:in `call'
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:413:in `each_strongly_connected_component_from'
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
from /Users/richardxxxx/Ruby/learn-rails/config/environment.rb:5:in `<top (required)>'
from /Users/richardxxxx/Ruby/learn-rails/config.ru:3:in `require'
from /Users/richardxxxx/Ruby/learn-rails/config.ru:3:in `block in <main>'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /Users/richardxxxx/Ruby/learn-rails/config.ru:in `new'
from /Users/richardxxxx/Ruby/learn-rails/config.ru:in `<main>'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands/server.rb:61:in `app'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands/server.rb:78:in `start'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/richardxxxx/Ruby/learn-rails/bin/rails:8:in `require'
from /Users/richardxxxx/Ruby/learn-rails/bin/rails:8:in `<top (required)>'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/spring-1.3.6/lib/spring/client/rails.rb:28:in `load'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/spring-1.3.6/lib/spring/client/rails.rb:28:in `call'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/spring-1.3.6/lib/spring/client/command.rb:7:in `call'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/spring-1.3.6/lib/spring/client.rb:26:in `run'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/spring-1.3.6/bin/spring:48:in `<top (required)>'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/spring-1.3.6/lib/spring/binstub.rb:11:in `load'
from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/spring-1.3.6/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/richardxxxx/Ruby/learn-rails/bin/spring:13:in `require'
from /Users/richardxxxx/Ruby/learn-rails/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
Richards-MBP:learn-rails richardxxxx$
Secrets.yml
发展: secret_key_base: xxxxxxxxxxxxxxxxx7b55dd0770dd2e4944b27f9e142ce21489b4d345d867d6264bb4115322d3b062cdc208994280f16f3f144fffdb6f81dd452b66d44
email_provider_username: <%= ENV["xxxxxxx@gmail.com"] %>
email_provider_password: <%= ENV["xxxxxxxxx"] %>
mailchimp_api_key: <%= ENV["xxxxxxxxxxxxxxxx"] %>
mailchimp_list_id: <%= ENV["xxxxxxxxxx"] %>
#domain_name: example.com
owner_email: <%= ENV["xxxxxxxx@gmail.com"] %>
测试: secret_key_base: xxxxxxxxxxxxxxxx3c55f9391abd14598cf558fdf97f54257afe621beadc1932df61a00a3af47e56bc6d82b029439a429f9a1ce2a5e1d3a9654ac4bb7357
# 不要在存储库中保留生产 secret , # 而是从环境中读取值。 生产:
email_provider_username: <%= ENV["GMAIL_USERNAME"] %>
email_provider_password: <%= ENV["GMAIL_PASSWORD"] %>
mailchimp_api_key: <%= ENV["MAILCHIMP_API_KEY"] %>
mailchimp_list_id: <%= ENV["MAILCHIMP_LIST_ID"] %>
#domain_name: <%= ENV["DOMAIN_NAME"] %>
owner_email: <%= ENV["OWNER_EMAIL"] %>
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
最佳答案
请检查 secret.yml 文件。这个错误几乎是yml文件缩进。
示例(secret.yml)
development:
secret_key_base: xxxxxxxxxxxxxxxxxxxx
staging:
secret_key_base: xxxxxxxxxxxxxxxxxxxx
test:
secret_key_base: xxxxxxxxxxxxxxxxxxxx
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
item:
name: apple
price: 10
日志
Exiting
/Users/haradaatsushi/.rbenv/versions/2.2.0/lib/ruby/2.2.0/psych.rb:370:in `parse': (<unknown>): mapping values are not allowed in this context at line 11 column 8 (Psych::SyntaxError)
关于ruby-on-rails - psych.rb :370 中的 Rails 服务器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32290629/
我正在使用 psych因子分析包。我想在 fa() 中指定潜在因素的标签对象,或使用 fa.diagram() 绘图时. 例如,玩具数据: require(psych) n <- 100 choice
我的问题与 psych 包中的 principal() 函数有关。 set.seed(0) x loading.x Loadings: RC1 RC3 RC4 RC2
当我使用主函数时,如下面的代码所示,我得到一个很好的表格,其中给出了所有标准化载荷,以及一个包含特征值以及解释的比例和累积比例的表格。 rotatedpca <- principal(PCFdatas
如何在 Psych 中反序列化以返回现有对象,例如类对象? 要做一个类的序列化,我可以做 require "psych" class Class yaml_tag 'class' def en
根据 http://yaml.org/spec/current.html#id2509980 YAML 文件中的注释是表示细节,不得出现在序列化/表示图中 (http://yaml.org/spec/
Ruby 1.9.3 默认使用 Psych对于 YAML。同时the ruby-doc documentation for it 完全没有,我找到了一份外部文档,暗示支持 indentation 选项
有谁知道如何在R中将describe.by统计数据导出到csv?我收到此消息: estatistica <- describe.by(pag,list(pag$Jogo) write.table(
请帮忙!按照以下代码尝试使用心理软件包进行调解模型。它原本有效,现在我不断收到错误消息 argument 3 matches multiple arguments require(psych) Med
让 x是一个示例数据框。 set.seed(0) x principal(x, nf=4, rotate="none") ... PC1 PC2 P
当我运行 alpha 时,我在构造上有五个项目在它上面我得到以下结果没有任何错误 psych::alpha(construct, na.rm = TRUE, ti
这是我的第一个 Rails 应用程序,非常感谢任何帮助。我已经在该应用程序上工作了几个星期,并且在运行 bundle install 时才开始遇到错误。 /usr/local/rvm/rubies/r
我正在用 Python 编写心理学实验,我需要将其作为 Web 应用程序提供。我已经让 Python 基本上作为命令行程序工作。在 CS 伙伴的推荐下,我将 Django 与 sqlite 数据库一起
这个问题在这里已经有了答案: Adding comment to YAML programmatically (1 个回答) 关闭 7 年前。 我想生成一个 YAML 文档,其中包含序列元素之间的一
使用 rvm 安装 Rails 后,我遇到了以下错误: /afs/andrew.cmu.edu/usr11/kvudata/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1
Ruby 版本:ruby 2.0.0p576(2014-09-19 修订版 47628)[x86_64-darwin13.4.0]我正在阅读“beginning ruby”一书,但在将 YAML
环境:ruby1.9.3,psych(任意版本)例如: o = { 'hash' => { 'name' => 'Steve', 'foo' => 'bar' } } => {"hash"=>{"n
我有一个类 Foo 应该以最人性化的方式序列化为文本文件,我使用 Ruby 的默认 YAML(Psych) 和自定义 encode_with。我的问题是:如果我像这样删除 !ruby/object:F
在我的 gem 中,我需要 yaml 并且在我的本地计算机上运行良好。 但是在将我的 gem 推送到 rubygems.org 之后,当我尝试使用我的 gem 时,我收到一条错误消息 => "un
我将 gem 推送到 rubygems.org,当我执行“gem install (gem)”时出现此错误: ERROR: While executing gem ... (NameError)
我正在尝试在具有数字和非数字列的数据框中的一列上使用 psych 包中的 reverse.code()。但是,当我尝试执行此操作时,出现错误: Error in items %*% keys.d :
我是一名优秀的程序员,十分优秀!