我不是 ruby 专家,但我设法收集了足够的信息来设置Gemfile
和安装所需的 Gemfile。
然而,最近,我遇到了一些问题。无论出于何种原因,我现在收到此错误:
> bundle install --deployment
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/usr/lib/ruby/gems/1.8/gems/bundler-1.3.1/lib/bundler/settings.rb:129:in `set_key': undefined method `to_yaml' for {"BUNDLE_FROZEN"=>"1"}:Hash (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.1/lib/bundler/settings.rb:129:in `open'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.1/lib/bundler/settings.rb:129:in `set_key'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.1/lib/bundler/settings.rb:17:in `[]='
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.1/lib/bundler/cli.rb:219:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.1/lib/bundler/vendor/thor/task.rb:27:in `__send__'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.1/lib/bundler/vendor/thor/task.rb:27:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.1/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.1/lib/bundler/vendor/thor.rb:344:in `dispatch'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.1/lib/bundler/vendor/thor/base.rb:434:in `start'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.1/bin/bundle:20
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.1/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.1/bin/bundle:20
from /usr/bin/bundle:19:in `load'
from /usr/bin/bundle:19
我已经查看了推荐的链接,但问题仍然存在。我Gemfile
的很简单:
source "https://rubygems.org"
gem 'sass'
以及随附的Gemfile.lock
:
GEM
remote: https://rubygems.org/
specs:
sass (3.2.6)
PLATFORMS
ruby
DEPENDENCIES
sass
为什么捆绑器无法安装?
更多细节:
使用旧版本的捆绑器(比如 1.2),工作得很好。只是不是1.3.1
我正在使用 ruby 1.8.7 和 rubygems 1.8.11。