2014-02-16 54 views
0

我正在使用Ubuntu。对于我的Rails应用程序,bundle install后,我输入了rake db:create那么就表明了以下错误:rake db:在postgresql中创建错误

/home/imtiaz/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:298:in `to_specs': Could not find 'rake' (>= 0) among 0 total gem(s) (Gem::LoadError) 
    from /home/imtiaz/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:309:in `to_spec' 
    from /home/imtiaz/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:53:in `gem' 
    from /home/imtiaz/.rvm/gems/ruby-1.9.3-p484/bin/rake:22:in `<main>' 
    from /home/imtiaz/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `eval' 
    from /home/imtiaz/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `<main>' 

我已经试过which rubywhich rakewhich bundle命令。这给了我答案:

/home/imtiaz/.rvm/gems/[email protected]/bin/bundle for `which bundle` 
/home/imtiaz/.rvm/gems/ruby-1.9.3-p484/bin/rake for `which rake` 
/home/imtiaz/.rvm/rubies/ruby-1.9.3-p484/bin/ruby for `which ruby` 

我现在能做什么?

+0

也许这个类似的问题帮助:http://stackoverflow.com/questions/9622467/after-installing-ruby-gems-running-the-new-gem-returns-could-not-find-errors(似乎你是使用rvm) –

+0

请提供'bundle show rake'吗? –

回答

0

试试这个:

bundle exec rake db:create

将使用的,你同捆装rake副本。任何作为捆绑包一部分的bin文件都是如此。