10
저는 fedora 16 Rails 버전 2.3.5 및 Ruby 1.9.2.p320에서 실행되는 레일즈 응용 프로그램에 문제가 있습니다. 우분투 11.10에서 잘 돌아가는 응용 프로그램입니다. 레일 서버를 실행하고 컨트롤러에 다음과 같은 오류가 나타납니다. 컨트롤러 명 번호의 actionname에서Psych :: SyntaxError가 YAML을 구문 분석하지 못했습니다
심리학 : 구문 에러가
내가이 다음 트릭을 적용 시도했지만 나를 위해 작동하지 않을 것 YAML
을 구문 분석 할 수 없습니다.
나는 다음과 같은 설정 라인/boot.rb을 추가 한
require 'yaml'
YAML::ENGINE.yamler = 'syck'
오류 추적 가진 탭하지만 공백을 좋아하지 않았다
.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/psych.rb:148:in `parse'
.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/psych.rb:148:in `parse_stream'
.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/psych.rb:119:in `parse'
.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/psych.rb:106:in `load'
.rvm/gems/[email protected]/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:189:in `load_yml'
.rvm/gems/[email protected]/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:176:in `load_file'
.rvm/gems/[email protected]/gems/activesupport-.3.5/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:13:in `block in load_translations'
.rvm/gems/[email protected]/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:13:in `each'
.rvm/gems/[email protected]/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:13:in `load_translations'
.rvm/gems/[email protected]/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:85:in `init_translations'
.rvm/gems/[email protected]/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:74:in `available_locales'
.rvm/gems/[email protected]/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/lib/i18n.rb:50:in `available_locales'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_view/template.rb:226:in `valid_locale?'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_view/template.rb:243:in `parse_extensions'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_view/template.rb:233:in `split'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_view/template.rb:118:in `initialize'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_view/reloadable_template.rb:81:in `initialize'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_view/reloadable_template.rb:38:in `new'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_view/reloadable_template.rb:38:in `register_template_from_file'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_view/reloadable_template.rb:62:in `block in load_all_templates_from_dir'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_view/reloadable_template.rb:62:in `each'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_view/reloadable_template.rb:62:in `load_all_templates_from_dir'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_view/reloadable_template.rb:29:in `[]'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_view/paths.rb:48:in `block in find_template'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_view/paths.rb:47:in `each'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_view/paths.rb:47:in `find_template'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/base.rb:1389:in `default_template'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/base.rb:905:in `render'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:51:in `block in render_with_benchmark'
.rvm/gems/[email protected]/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `block in ms'
.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/benchmark.rb:310:in `realtime'
.rvm/gems/[email protected]/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `ms'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:51:in `render_with_benchmark'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/base.rb:1326:in `default_render'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/base.rb:1332:in `perform_action'
.rvm/gems/ruby-1.9.2-p[email protected]/gems/actionpack-2.3.5/lib/action_controller/filters.rb:617:in `call_filters'
.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/filters.rb:610:in `perform_action_with_filters'
/.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:68:in `block in perform_action_with_benchmark'
.rvm/gems/[email protected]/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `block in ms'
.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/benchmark.rb:310:in `realtime
나는 가 'YAML' YAML :: ENGINE.yamler = 'syck' –
감사를 요구 environment.rb에 파일에 다음 줄을 추가했습니다. – johndpope
그게 올바른 해결책이었습니다. 별도의 줄에 "YAML :: ENGINE.yamler = 'syck'"를 포함시켜야합니다. –