Tôi đã làm rối tung xung quanh với cả RubyOnRails3 và Git lần đầu tiên. Mọi thứ đã diễn ra suôn sẻ cho đến khi tất cả đột ngột bất kỳ đối số dòng lệnh liên quan nào ngừng hoạt động. Thật không may tôi không có ý tưởng gì gây ra điều này hoặc làm thế nào để đi về sửa chữa nó.lockfile_parser.r: 48: trong `parse_source ': phương thức undefined` []' cho nil: NilClass (NoMethodError)
Dưới đây là đầu ra từ dòng lệnh
C:\railstest\railsproject>rails
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/lockfile_parser.rb
:48:in `parse_source': undefined method `[]' for nil:NilClass (NoMethodError)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/lockf
ile_parser.rb:20:in `block in initialize'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/lockf
ile_parser.rb:14:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/lockf
ile_parser.rb:14:in `initialize'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/defin
ition.rb:43:in `new'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/defin
ition.rb:43:in `initialize'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/dsl.r
b:122:in `new'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/dsl.r
b:122:in `to_definition'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/defin
ition.rb:20:in `build'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler.rb:12
8:in `definition'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler.rb:11
6:in `load'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler.rb:10
0:in `setup'
from C:/railstest/railsproject/config/boot.rb:8:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from script/rails:5:in `<main>'
Tôi không chắc chắn chính xác những thông tin nào khác để cung cấp
Cảm ơn giải pháp đó, đó chính là vấn đề tôi gặp phải. Lưu ý: bạn có thể phải xóa tệp gemfile.lock cho mọi nhánh trong đó vấn đề xảy ra Ít nhất, tôi phải làm vậy. – Dave