Rake错误:警告:已经初始化常量MAJOR

时间:2011-09-15 02:23:27

标签: ruby-on-rails ruby-on-rails-3 ruby-on-rails-3.1

  

可能重复:
  Problem to run comand rake

yulong@ubuntu:~/depotnew$ rake db:migrate
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:4: warning: already initialized constant MAJOR
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:5: warning: already initialized constant MINOR
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:6: warning: already initialized constant BUILD
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:3: warning: already initialized constant NUMBERS
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:9: warning: already initialized constant VERSION
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake.rb:26: warning: already initialized constant RAKEVERSION
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/early_time.rb:17: warning: already initialized constant EARLY
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/alt_system.rb:32: warning: already initialized constant WINDOWS
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:28: 
warning: already initialized constant DEFAULT_RAKEFILES
WARNING: Possible conflict with Rake extension: String#ext already exists
WARNING: Possible conflict with Rake extension: String#pathmap already exists
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task_arguments.rb:73: warning: already initialized constant EMPTY_TASK_ARGS
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/invocation_chain.rb:49: warning: already initialized constant EMPTY
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_utils.rb:10: warning: already initialized constant RUBY
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_utils.rb:84: warning: already initialized constant LN_SUPPORTED
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/dsl_definition.rb:143: warning: already initialized constant Commands
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:44: warning: already initialized constant ARRAY_METHODS
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:47: warning: already initialized constant MUST_DEFINE
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:51: warning: already initialized constant MUST_NOT_DEFINE
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:55: warning: already initialized constant SPECIAL_RETURN
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:61: warning: already initialized constant DELEGATING_METHODS
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:364: warning: already initialized constant DEFAULT_IGNORE_PATTERNS
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:370: warning: already initialized constant DEFAULT_IGNORE_PROCS
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake.rb:64: warning: already initialized constant FileList
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake.rb:65: warning: already initialized constant RakeFileUtils
rake aborted!
stack level too deep

输入后:捆绑exec bash ,它有效,为什么??

1 个答案:

答案 0 :(得分:4)

请参阅我对问题“Stack level too deep” running rake db:create:all的回答,这听起来像是同一解决方案中的类似问题。