我已经尝试过关于此问题的网站上发布的答案。但没有任何效果
我有以下设置:
Wayne E. Seguin的Rails 3.0.7
ruby 1.9.2p290(2011-07-09修订版32553)[i686-linux]
跑步时:
$rake db:migrate --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 constant 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
答案 0 :(得分:5)
'bundle exec rake db:migrate'在类似情况下对我有用,但它似乎并不“正确”。
我发现'rvm implode'是我自己最干净的方法(虽然可能有点过分)。升级到OS X Lion之后,我的问题出现了,有些宝石似乎不再安装了。
rvm内爆。重新安装rvm。安装红宝石。安装导轨。捆绑安装。rake db:migrate再次运行,但没有使用bundle exec。