【问题标题】:POW/Rails error: Error starting applicationBundler::GemNotFound: Could not find minitest-4.7.5 in any of the sourcesPOW/Rails 错误:启动 applicationBundler::GemNotFound 时出错:在任何源中都找不到 minitest-4.7.5
【发布时间】:2013-08-29 14:26:27
【问题描述】:

我只需要删除 RVM 并重新安装,然后安装 Ruby 2.0.0

我可以在项目中从命令行运行 rails 控制台,但无法在浏览器中加载它。

我在这里阅读了一些关于 .bash_profile 和 .bashrc 的答案,但我的 ~ 文件夹中都不存在。我尝试弄乱 .bashrc 文件,但没有任何帮助。

在我的 .bashrc 中:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

rvm 列表:

=* ruby-2.0.0-p247 [ x86_64 ]

导轨-v

Rails 4.0.0

现在当我尝试启动我的应用程序时,我看到了:

Bundler::GemNotFound: 找不到 minitest-4.7.5 在任何 来源 /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/spec_set.rb:92:in block in materialize' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in map! /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in materialize' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in specs' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in specs_for' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in requested_specs' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in requested_specs' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in setup' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler.rb:120:in setup' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in ' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:116:in require' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:116:in rescue in require' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:122:in require' ~/Sites/projectname/config/boot.rb:4:in' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in require' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in require' ~/Sites/projectname/config/application.rb:1:in <top (required)>' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in require' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in require' ~/Sites/projectname/config/environment.rb:2:in' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in require' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in require' ~/Sites/projectname/config.ru:3:in block in <main>' ~/Library/Application Support/Pow/Versions/0.4.1/node_modules/nack/lib/nack/builder.rb:4:in instance_eval' ~/Library/Application Support/Pow/Versions/0.4.1/node_modules/nack/lib/nack/builder.rb:4:in initialize' ~/Sites/projectname/config.ru:1:innew' ~/Sites/projectname/config.ru:1:in <main>' ~/Library/Application Support/Pow/Versions/0.4.1/node_modules/nack/lib/nack/server.rb:50:in eval' ~/Library/Application Support/Pow/Versions/0.4.1/node_modules/nack/lib/nack/server.rb:50:in load_config' ~/Library/Application Support/Pow/Versions/0.4.1/node_modules/nack/lib/nack/server.rb:43:in initialize' ~/Library/Application Support/Pow/Versions/0.4.1/node_modules/nack/lib/nack/server.rb:13:in new' ~/Library/Application Support/Pow/Versions/0.4.1/node_modules/nack/lib/nack/server.rb:13:in run' ~/Library/Application Support/Pow/Versions/0.4.1/node_modules/nack/bin/nack_worker:4:in `'

rvm 信息:

system:
    uname:       "**** 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64"
    system:      "osx/10.7/x86_64"
    bash:        "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin11)"
    zsh:         "/bin/zsh => zsh 4.3.11 (i386-apple-darwin11.0)"

  rvm:
    version:      "rvm 1.22.3 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "3 days 23 hours 28 minutes 44 seconds ago"
    path:         "/usr/local/rvm"

  ruby:
    interpreter:  "ruby"
    version:      "2.0.0p247"
    date:         "2013-06-27"
    platform:     "x86_64-darwin11.4.2"
    patchlevel:   "2013-06-27 revision 41674"
    full_version: "ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin11.4.2]"

  homes:
    gem:          "/usr/local/rvm/gems/ruby-2.0.0-p247"
    ruby:         "/usr/local/rvm/rubies/ruby-2.0.0-p247"

  binaries:
    ruby:         "/usr/local/rvm/rubies/ruby-2.0.0-p247/bin/ruby"
    irb:          "/usr/local/rvm/rubies/ruby-2.0.0-p247/bin/irb"
    gem:          "/usr/local/rvm/rubies/ruby-2.0.0-p247/bin/gem"
    rake:         "/usr/local/rvm/gems/ruby-2.0.0-p247@global/bin/rake"

  environment:
    PATH:         "/usr/local/rvm/gems/ruby-2.0.0-p247/bin:/usr/local/rvm/gems/ruby-2.0.0-p247@global/bin:/usr/local/rvm/rubies/ruby-2.0.0-p247/bin:/usr/local/rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin:/usr/local/mysql/bin"
    GEM_HOME:     "/usr/local/rvm/gems/ruby-2.0.0-p247"
    GEM_PATH:     "/usr/local/rvm/gems/ruby-2.0.0-p247:/usr/local/rvm/gems/ruby-2.0.0-p247@global"
    MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-2.0.0-p247"
    IRBRC:        "/usr/local/rvm/rubies/ruby-2.0.0-p247/.irbrc"
    RUBYOPT:      ""
    gemset:       ""

捆绑:

Using: /usr/local/rvm/gems/ruby-2.0.0-p247@projectgemfile
mac:project joel$ bundle install
Using rake (10.1.0) 
Using i18n (0.6.5) 
Using minitest (4.7.5) 
Using multi_json (1.7.9) 
Using atomic (1.1.13) 
Using thread_safe (0.1.2) 
Using tzinfo (0.3.37) 
Using activesupport (4.0.0) 
Using builder (3.1.4) 
Using erubis (2.7.0) 
Using rack (1.5.2) 
Using rack-test (0.6.2) 
Using actionpack (4.0.0) 
Using mime-types (1.24) 
Using polyglot (0.3.3) 
Using treetop (1.4.15) 
Using mail (2.5.4) 
Using actionmailer (4.0.0) 
Using activemodel (4.0.0) 
Using activerecord-deprecated_finders (1.0.3) 
Using arel (4.0.0) 
Using activerecord (4.0.0) 
Using coffee-script-source (1.6.3) 
Using execjs (2.0.0) 
Using coffee-script (2.2.0) 
Using thor (0.18.1) 
Using railties (4.0.0) 
Using coffee-rails (4.0.0) 
Using multipart-post (1.2.0) 
Using faraday (0.8.8) 
Using hashie (2.0.5) 
Using hike (1.2.3) 
Using httpauth (0.2.0) 
Using jbuilder (1.5.1) 
Using jquery-rails (3.0.4) 
Using json (1.8.0) 
Using jwt (0.1.8) 
Using oauth2 (0.8.1) 
Using omniauth (1.1.4) 
Using omniauth-oauth2 (1.0.3) 
Using omniauth-facebook (1.4.0) 
Using pg (0.16.0) 
Using bundler (1.3.5) 
Using tilt (1.4.1) 
Using sprockets (2.10.0) 
Using sprockets-rails (2.0.0) 
Using rails (4.0.0) 
Using rdoc (3.12.2) 
Using sass (3.2.10) 
Using sass-rails (4.0.0) 
Using sdoc (0.3.20) 
Using turbolinks (1.3.0) 
Using uglifier (2.2.0) 
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-3 rvm ruby-on-rails-4 rack-pow


    【解决方案1】:

    this post 的解决方案对我有用。

    rvm env . &gt; .powenv

    【讨论】:

      【解决方案2】:

      根据这个关于bundler version 1.5.0 的链接,您应该将您的捆绑器升级到版本 1.5.1 以修复一个讨厌的小错误,该错误在 Ruby 1.9 和 2.0 中出现在默认 gem 中。我只是在运行 bundle install 之前运行了 gem update bundler,现在一切正常。

      【讨论】:

        【解决方案3】:

        尝试在应用程序的根目录中添加.rvcrc

        rvm 2.0.0
        

        如果您使用不同的 gemset,则低于:

        rvm 2.0.0@rails4  # replace rails4 with your gemset
        

        您可以在http://pow.cx/manual.html#section_2.3.2查看更多信息

        【讨论】:

          【解决方案4】:

          您确定为 RVM / Pow 正确设置了集成吗?

          这两个项目都展示了如何执行此操作的示例,尽管 RVM 一个更完整:http://rvm.io/integration/pow#using-rvm-with-pow - 我不会在此处粘贴代码,因为如果需要,网站会更新。

          【讨论】:

          • 我的项目中需要一个 .powrc 文件。
          【解决方案5】:

          你需要运行:

          bundle install
          

          它将确保应用程序所需的所有宝石都可用

          【讨论】:

          • 我运行了 bundle,它显示了我项目 gemset 中的所有 gem
          • 是的。当我回到那台机器的家时,我会发布捆绑输出。我正在使用 RVM 和 .rvmrc 文件,所以这行不应该在 ruby​​ 版本之后说出我的 gem 名称:Bundler::GemNotFound: Could not find minitest-4.7.5 in any sources /usr/local/ rvm/gems/ruby-2.0.0-p247 @GEMSETNAMEHERE
          • 将 bundle 的输出添加到我的问题中。
          • 我可以从命令行运行 rails 控制台。所以我不确定这是 POW 还是什么
          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2014-12-14
          • 2015-03-08
          • 1970-01-01
          • 1970-01-01
          • 2012-04-20
          • 1970-01-01
          相关资源
          最近更新 更多