Home Articles

独角兽错误:无法在任何来源中找到rake-10.3.2(Bundler :: GemNotFound)

Asked
Viewed 1501 times
0

我是关于设置VPS for rails app的初学者,开始我正在尝试将Nginx Unicorn与Digital Ocean作为提供商(特别是One Click安装https://www.digitalocean.com/community/tutorials/how-to-1-click-install-ruby-on-rails-on-ubuntu-12-10-with-digitalocean) .

我很容易配置所有环境(unicorn.conf,nginx.conf,capistrano,git,...),但现在我陷入了错误 .

日志文件 /home/unicorn/log/unicorn.log 不断收到此错误(因此它是grooowing):

E,[2014-10-19T19:09:24.117472#24110]错误 - :在任何来源(Bundler :: GemNotFound)/ usr / local / rvm / gems / ruby-找不到rake-10.3.2- 2.1.3 / gems / bundler-1.7.3 / lib / bundler / spec_set.rb:92:in in materialize'/usr/local/rvm/gems/ruby-2.1.3/gems/bundler-1.7.3/ lib / bundler / spec_set.rb:85:在 Map 中!' /usr/local/rvm/gems/ruby-2.1.3/gems/bundler-1.7.3/lib/bundler/spec_set.rb:85:in materialize'/usr/local/rvm/gems/ruby-2.1.3 /gems/bundler-1.7.3/lib/bundler/definition.rb:132:in specs'/usr/local/rvm/gems/ruby-2.1.3/gems/bundler-1.7.3/lib/bundler/definition .rb:177:在specs_for'/usr/local/rvm/gems/ruby-2.1.3/gems/bundler-1.7.3/lib/bundler/definition.rb:166:in requested_specs'/ usr / local / rvm /gems/ruby-2.1.3/gems/bundler-1.7.3/lib/bundler/environment.rb:18:in requested_specs'/usr/local/rvm/gems/ruby-2.1.3/gems/bundler-1.7 .3 / lib / bundler / runtime.rb:13:在setup'/usr/local/rvm/gems/ruby-2.1.3/gems/bundler-1.7.3/lib/bundler.rb:121:in setup'中/usr/local/rvm/gems/ruby-2.1.3/gems/bundler-1.7.3/lib/bundler/setup.rb:17:in'/usr/local/rvm/rubies/ruby-2.1.3/ lib / ruby / 2.1.0 / rubygems / core_ext / kernel_require.rb:135:in require'/usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require . rb:135:救援中的'/usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/ker nel_require.rb:144:在require'/var/www/inphrase/releases/20141018133126/config/boot.rb:4:in'/usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1 .0 / rubygems / core_ext / kernel_require.rb:55:in require'/usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in要求'/var/www/inphrase/releases/20141018133126/config/application.rb:1:in <top(required)>'/usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1 . 0 / rubygems / core_ext / kernel_require.rb:55:in require'/usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require '/var/www/inphrase/releases/20141018133126/config/environment.rb:2:in'/usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require .rb:55:在require'/usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require'config.ru:4: in <main>'/usr/local/rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/builder.rb:55:in instance_eval'/ usr / local / rvm /宝石/红宝石2.1.3 /宝石s / rack-1.5.2 / lib / rack / builder.rb:55:in initialize'config.ru:1:innew'config.ru:1:in <main>'/ usr / local / rvm / gems / ruby -2.1.3 / gems / unicorn-4.8.3 / lib / unicorn.rb:48:in eval'/usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn .rb:48:在构建器中的块'/usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in call'/ usr / local /rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in build_app!' /usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:628:in init_worker_process'/usr/local/rvm/gems/ruby-2.1.3 /gems/unicorn-4.8.3/lib/unicorn/http_server.rb:651:in worker_loop'/usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn/http_server .rb:525:在spawn_missing_workers'/usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:536:in maintain_worker_count'/ usr / local / rvm /gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:294:in join'/usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8 .3 / bin / unicorn:126:in <top(required)>'/usr/local/rvm/gems/ruby-2.1.3/bin/unicorn:23:in load'/ usr / local / rvm / gems / ruby-2.1.3 / bin / unicorn:23:在<main>'/usr/local/rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in eval'/ usr / local / rvm / gems / ruby-2.0.0-p353 / bin / ruby_executable_hooks:15:in ...

我已经在服务器的文件夹应用程序中运行了 Bundle install ,所有宝石都已成功安装,为什么我得到了臭名昭着的 Could not find rake-10.3.2 in any of the sources (Bundler::GemNotFound)

感谢您的任何帮助

1 Answer

  • 2

    你使用两种不同的红宝石 . Bundler在一个gemset中安装Rake,Rails正在寻找另一个 . 查看堆栈跟踪的底部:

    load'/ usr / local / rvm / gems / ruby-2.1.3 / bin / unicorn:23:in'/ usr / local / rvm / gems / ruby-2.0.0-p353 / bin / ruby_executable_hooks:15:in eval'/ usr / local / rvm / gems / ruby-2.0.0-p353 / bin / ruby_executable_hooks:15:in ...

    设置要使用的默认Ruby版本:

    rvm use --default 2.1.3
    

    打开Gemfile并指定匹配的Ruby版本

    # Gemfile
    source 'https://rubygems.org'
    ruby '2.1.3'
    # ...
    

    然后再次运行 bundle install .

Related