版本:
红宝石 1.9.3p194
导轨 3.2.13
捆绑器 1.3.5
当我运行时rails new new_app
,我得到:
run bundle install
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/ui.rb:36:in `initialize': undefined method `[]' for #<Thor::Shell::Color:0x00000002b25708> (NoMethodError)
from /usr/lib/ruby/vendor_ruby/bundler/cli.rb:12:in `new'
from /usr/lib/ruby/vendor_ruby/bundler/cli.rb:12:in `initialize'
from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor.rb:263:in `new'
from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor.rb:263:in `dispatch'
from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor/base.rb:386:in `start'
from /var/lib/gems/1.9.1/gems/bundler-1.3.5/bin/bundle:20:in `block in <main>'
from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'
from /var/lib/gems/1.9.1/gems/bundler-1.3.5/bin/bundle:20:in `<main>'
有问题的代码ui.rb
是:
def initialize(options = {})
if options["no-color"] || !STDOUT.tty?
Thor::Base.shell = Thor::Shell::Basic
end
@shell = Thor::Base.shell.new
@level = ENV['DEBUG'] ? "debug" : "info"
end