RVM,Rails 加载错误

RVM, Rails LoadError

我在启动和 运行 新 rails 项目时遇到问题。自从我创建一个新项目以来已经有一段时间了,但一直在从事各种与工作相关的项目,这些项目有许多不同的 rails/ruby 版本(都很好)。也就是说,我只是尝试创建一个新项目,当我 运行 rails -vrails new xxxx 时,我得到:

/Users/trevor/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- /Users/trevor/Desktop/config/boot (LoadError)
from /Users/trevor/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from script/rails:5:in `<main>'

细节

ruby -v => ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14] * 使用 RVM 哪个ruby=>/Users/trevor/.rvm/rubies/ruby-2.2.2/bin/ruby
gem 列表 => 显示所有必需的 gems(即 rails、捆绑器等)
rvm 信息 =>

ruby-2.2.2:

  system:
    uname:       "Darwin Trevor.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64"
    system:      "osx/10.10/x86_64"
    bash:        "/bin/bash => GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14)"
    zsh:         "/usr/local/bin/zsh => zsh 5.0.8 (x86_64-apple-darwin14.3.0)"

  rvm:
    version:      "rvm 1.26.11 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "2 months 7 days 5 hours 33 minutes 19 seconds ago"
    path:         "/Users/trevor/.rvm"

  ruby:
    interpreter:  "ruby"
    version:      "2.2.2p95"
    date:         "2015-04-13"
    platform:     "x86_64-darwin14"
    patchlevel:   "2015-04-13 revision 50295"
    full_version: "ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]"

  homes:
    gem:          "/Users/trevor/.rvm/gems/ruby-2.2.2"
    ruby:         "/Users/trevor/.rvm/rubies/ruby-2.2.2"

  binaries:
    ruby:         "/Users/trevor/.rvm/rubies/ruby-2.2.2/bin/ruby"
    irb:          "/Users/trevor/.rvm/rubies/ruby-2.2.2/bin/irb"
    gem:          "/Users/trevor/.rvm/rubies/ruby-2.2.2/bin/gem"
    rake:         "/Users/trevor/.rvm/rubies/ruby-2.2.2/bin/rake"

  environment:
    PATH:         "/Users/trevor/.rvm/gems/ruby-2.2.2/bin:/Users/trevor/.rvm/gems/ruby-2.2.2@global/bin:/Users/trevor/.rvm/rubies/ruby-2.2.2/bin:/Users/trevor/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:bin:/Users/trevor/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin"
    GEM_HOME:     "/Users/trevor/.rvm/gems/ruby-2.2.2"
    GEM_PATH:     "/Users/trevor/.rvm/gems/ruby-2.2.2:/Users/trevor/.rvm/gems/ruby-2.2.2@global"
    MY_RUBY_HOME: "/Users/trevor/.rvm/rubies/ruby-2.2.2"
    IRBRC:        "/Users/trevor/.rvm/rubies/ruby-2.2.2/.irbrc"
    RUBYOPT:      ""
    gemset:       ""

我试过的

想通了,但想 post 以防其他人在同一条船上。在我意识到 rails new 可以在其他目录中工作后,显然在桌面上创建项目时发生了一些事情。

最重要的是,请确保在 运行 名为 script 的 rails 命令所在的目录中没有 file/directories。可能还有其他 file/directory 个名称也可能导致冲突。