当我运行 rails -v 或 rails new 时,会发生这种情况。根本没有乱糟糟的。我想在发布垃圾并重新安装rails之前我会发布这里。
假设我的安装已经开始
/Users/fugazy/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:112:in `require': /Users/fugazy/.rvm/gems/ruby-1.9.3-p392/gems/rails-0.13.1/lib/rails_generator/options.rb:124: syntax error, unexpected '[', expecting '|' (SyntaxError)
...make any changes.') { |options[:pretend]| }
... ^
/Users/fugazy/.rvm/gems/ruby-1.9.3-p392/gems/rails-0.13.1/lib/rails_generator/options.rb:127: syntax error, unexpected '[', expecting '|'
...ss normal output.') { |options[:quiet]| }
... ^
/Users/fugazy/.rvm/gems/ruby-1.9.3-p392/gems/rails-0.13.1/lib/rails_generator/options.rb:128: syntax error, unexpected '[', expecting '|'
...ktrace on errors.') { |options[:backtrace]| }
... ^
/Users/fugazy/.rvm/gems/ruby-1.9.3-p392/gems/rails-0.13.1/lib/rails_generator/options.rb:129: syntax error, unexpected '[', expecting '|'
...his help message.') { |options[:help]| }
... ^
from /Users/fugazy/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:112:in `require'
from /Users/fugazy/.rvm/gems/ruby-1.9.3-p392/gems/rails-0.13.1/lib/rails_generator/base.rb:1:in `<top (required)>'
from /Users/fugazy/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:112:in `require'
from /Users/fugazy/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:112:in `require'
from /Users/fugazy/.rvm/gems/ruby-1.9.3-p392/gems/rails-0.13.1/lib/rails_generator.rb:34:in `<top (required)>'
from /Users/fugazy/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:112:in `require'
from /Users/fugazy/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:112:in `require'
from /Users/fugazy/.rvm/gems/ruby-1.9.3-p392/gems/rails-0.13.1/bin/rails:14:in `<top (required)>'
from /Users/fugazy/.rvm/gems/ruby-1.9.3-p392/bin/rails:19:in `load'
from /Users/fugazy/.rvm/gems/ruby-1.9.3-p392/bin/rails:19:in `<main>'
from /Users/fugazy/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/fugazy/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'
答案 0 :(得分:0)
我的好友在该目录中没有rails,我修复了这个问题。直到@benjamin Sinclaire指出版本#。
才意识到这一点