ROR: rake aborted! stack level too deep
I alread tried the answers posted on this website regarding this issue. But nothing worked
I have the following setup:
rvm 1.6.32 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]
Rails 3.0.7
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]
On running:
$rake db:migrate --trace
I get the following error
Error with trace
(in /home/cjr/Videos/ece_project2/ece_app)
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.15/lib/bundler/runtime.rb:136: warning: Insecure world writable dir /home/cjr in PATH, mode 040777
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:32: warning: already initialized constant RAKEVERSION
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake/alt_system.rb:32: warning: already initialized constant WINDOWS
WARNING: Possible conflict with Rake extension: String#ext already exists
WARNING: Possible conflict with Rake extension: String#pathmap already exists
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:404: warning: already initialized const开发者_JAVA技巧ant EMPTY_TASK_ARGS
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:452: warning: already initialized constant EMPTY
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:960: warning: already initialized constant RUBY_EXT
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:964: warning: already initialized constant RUBY
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:1033: warning: already initialized constant LN_SUPPORTED
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:1242: warning: already initialized constant ARRAY_METHODS
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:1245: warning: already initialized constant MUST_DEFINE
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:1249: warning: already initialized constant MUST_NOT_DEFINE
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:1253: warning: already initialized constant SPECIAL_RETURN
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:1259: warning: already initialized constant DELEGATING_METHODS
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:1569: warning: already initialized constant DEFAULT_IGNORE_PATTERNS
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:1575: warning: already initialized constant DEFAULT_IGNORE_PROCS
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:1612: warning: already initialized constant FileList
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:1638: warning: already initialized constant EARLY
/home/cjr/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.8.7/lib/rake.rb:1968: warning: already initialized constant DEFAULT_RAKEFILES
rake aborted!
stack level too deep
/home/cjr/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.8.7/lib/rake.rb:2383
'bundle exec rake db:migrate' was working for me in a similar situation, but it didn't seem "right".
I found 'rvm implode' to be the cleanest method for myself (though likely overkill). My problems arose sometime after upgrading to OS X Lion, when some gems no longer appeared to be installed.
rvm implode. reinstall rvm. install ruby. install rails. bundle install.
rake db:migrate worked again without prefacing it with bundle exec.
side note: I'd be curious to know more about what actually is going on here. I presume its a conflict with different versions of the same gem being installed? But I couldn't find any detailed logging that pointed towards a specific direction.
精彩评论