Rails 3-2稳定在Ruby 2.0上,精神错误在bundle上

时间:2012-11-10 15:31:28

标签: ruby-on-rails ruby-2.0

由于an issue in Sprockets that fails in Ruby 2.0,我需要将我的Rails版本更新到最新版本。结果,我的Gemfile看起来像这样:

gem 'rails', git: 'git://github.com/rails/rails.git', branch: "3-2-stable"

然后导致如下所示的堆栈跟踪。 Rails edge也显示了同样的问题,尽管他们正在针对Ruby 2.0运行他们的测试套件,所以它必须是兼容的。

所以我猜测可能存在依赖于Rails或Ruby构建的依赖库,这些库不能与Ruby 2.0-preview1一起使用

> bundle
Updating git://github.com/rails/rails.git
Unfortunately, a fatal error has occurred. Please see the Bundler 
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks! 
.rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/psych.rb:205:in `parse': (<unknown>): mapping values are not allowed in this context at line 8 column 35 (Psych::SyntaxError)
  from .rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/psych.rb:205:in `parse_stream'
  from .rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/psych.rb:153:in `parse'
  from .rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/psych.rb:129:in `load'
  from .rvm/rubies/ruby-2.0.0-preview1/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:491:in `from_yaml'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler.rb:294:in `block in load_gemspec_uncached'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler.rb:291:in `chdir'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler.rb:291:in `load_gemspec_uncached'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler.rb:282:in `load_gemspec'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/source.rb:411:in `block in load_spec_files'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/source.rb:410:in `each'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/source.rb:410:in `load_spec_files'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/source.rb:799:in `load_spec_files'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/source.rb:381:in `local_specs'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/source.rb:774:in `specs'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/definition.rb:491:in `block in converge_locked_specs'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/definition.rb:480:in `each'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/definition.rb:480:in `converge_locked_specs'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/definition.rb:166:in `resolve'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/definition.rb:113:in `specs'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/definition.rb:108:in `resolve_remotely!'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/installer.rb:81:in `run'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/installer.rb:14:in `install'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/cli.rb:230:in `install'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/vendor/thor/task.rb:27:in `run'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/vendor/thor.rb:275:in `dispatch'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/vendor/thor/base.rb:408:in `start'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/bin/bundle:14:in `block in <top (required)>'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
  from .rvm/gems/ruby-2.0.0-preview1@global/gems/bundler-1.2.1/bin/bundle:14:in `<top (required)>'
  from .rvm/gems/ruby-2.0.0-preview1@global/bin/bundle:19:in `load'
  from .rvm/gems/ruby-2.0.0-preview1@global/bin/bundle:19:in `<main>'
  from .rvm/gems/ruby-2.0.0-preview1@album_releases/bin/ruby_noexec_wrapper:14:in `eval'
  from .rvm/gems/ruby-2.0.0-preview1@album_releases/bin/ruby_noexec_wrapper:14:in `<main>'

2 个答案:

答案 0 :(得分:1)

这是Bundler中的一个错误,如下所述:https://github.com/rails/rails/issues/8136

此后一直在修复。

答案 1 :(得分:0)

我有这个问题。它是由gemspec(Prawn,在我的例子中)中的heredoc中的“this:”之类的心理观察引起的,并且认为它是一个哈希。我相信它在2.0.0-preview1中是一个回归,因为我之前有过ruby-head,并没有遇到过这个问题。