未初始化常量 Syck::DefaultResolver

发布于 2024-10-09 05:49:52 字数 3006 浏览 3 评论 0原文

我是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱的那么颓废 2024-10-16 05:49:52

我写了一个关于安装此版本 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文