未初始化常量 Syck::DefaultResolver
我是 ruby(尤其是 Rails)的新手开发者,但我确实有一些 Perl 和 php 经验。不管怎样,我正在尝试使用最新的 ruby 包:v1.9.2-p136
在 Ubuntu 10.10 上配置 rails
版本 3。虽然比 p0 更好,但进展不太顺利:至少它们包含了 yaml.rb 和朋友,这样我就不用花时间把它们拼凑在一起。但是,我仍然遇到 YAML 包的问题,每当我尝试安装或配置任何 gem 或包时,该问题就会显现出来。我已经通过 Synaptic 安装了 Rails;这只是为了展示问题。
gem i rails
ERROR: Loading command: install (NameError)
uninitialized constant Syck::DefaultResolver
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
当我尝试使用 synaptic
安装 redmine
时,实际上出现了这种情况:它现在说每个 synaptic 安装都以失败告终,所有原因都是:
rake aborted!
uninitialized constant Syck::DefaultResolver
/usr/local/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
/usr/local/lib/ruby/1.9.1/syck.rb:82:in `<module:Syck>'
/usr/local/lib/ruby/1.9.1/syck.rb:80:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/usr/local/lib/ruby/site_ruby/1.9.1/yaml/syck.rb:5:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/usr/local/lib/ruby/site_ruby/1.9.1/yaml.rb:12:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/usr/share/redmine/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:2:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/usr/share/redmine/vendor/rails/railties/lib/rails/gem_dependency.rb:1:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/usr/share/redmine/vendor/rails/railties/lib/initializer.rb:10:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/usr/share/redmine/config/boot.rb:45:in `load_initializer'
/usr/share/redmine/config/boot.rb:38:in `run'
/usr/share/redmine/config/boot.rb:11:in `boot!'
/usr/share/redmine/config/boot.rb:110:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/usr/share/redmine/Rakefile:4:in `<top (required)>'
/usr/local/lib/ruby/1.9.1/rake.rb:2373:in `load'
/usr/local/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/local/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/local/bin/rake:31:in `<main>'
dpkg: error processing redmine (--configure):
subprocess installed post-installation script returned error exit status 1
I'm a fairly new dev to ruby and especially rails, but I do have some perl and php experience. Anyway, I'm trying to get rails
version 3 configured on Ubuntu 10.10 using the latest ruby package: v1.9.2-p136
. It isn't going too well, though better than p0
: at least they included the yaml.rb
and friends, so that I'm not spending my time cobbling them together. However, I'm still having a problem with the YAML package, which manifests itself whenever I try to install or configure any gem or package. I installed rails through synaptic
already; this was just for showcasing the problem.
gem i rails
ERROR: Loading command: install (NameError)
uninitialized constant Syck::DefaultResolver
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
This actually showed up when I tried to install redmine
with synaptic
: it now says every synaptic installation ends in failure, all because of:
rake aborted!
uninitialized constant Syck::DefaultResolver
/usr/local/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
/usr/local/lib/ruby/1.9.1/syck.rb:82:in `<module:Syck>'
/usr/local/lib/ruby/1.9.1/syck.rb:80:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/usr/local/lib/ruby/site_ruby/1.9.1/yaml/syck.rb:5:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/usr/local/lib/ruby/site_ruby/1.9.1/yaml.rb:12:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/usr/share/redmine/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:2:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/usr/share/redmine/vendor/rails/railties/lib/rails/gem_dependency.rb:1:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/usr/share/redmine/vendor/rails/railties/lib/initializer.rb:10:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/usr/share/redmine/config/boot.rb:45:in `load_initializer'
/usr/share/redmine/config/boot.rb:38:in `run'
/usr/share/redmine/config/boot.rb:11:in `boot!'
/usr/share/redmine/config/boot.rb:110:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/usr/share/redmine/Rakefile:4:in `<top (required)>'
/usr/local/lib/ruby/1.9.1/rake.rb:2373:in `load'
/usr/local/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/local/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/local/bin/rake:31:in `<main>'
dpkg: error processing redmine (--configure):
subprocess installed post-installation script returned error exit status 1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我写了一个关于安装此版本 Ruby 的指南: http:// ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you。它应该可以让您立即启动并运行。
I wrote a guide on installing this version of Ruby: http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you. It should get you up and running in no time.