treiff
treiff

Reputation: 1306

RVM, Rails LoadError

I am having a issue getting a new rails project up and running. Its been a while since I've created a new project, but have been working on various work related projects with many different rails/ruby versions (all fine). That said, I just tried to create a new project and when I run rails -v or rails new xxxx for that matter I get:

/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>'

Specifics

ruby -v => ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14] * using RVM which ruby => /Users/trevor/.rvm/rubies/ruby-2.2.2/bin/ruby
gem list => shows all necessary gems (i.e rails, bundler etc)
rvm info =>

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 <[email protected]>, Michal Papis <[email protected]> [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:       ""

What I've Tried

Upvotes: 2

Views: 467

Answers (1)

treiff
treiff

Reputation: 1306

Figured it out, but wanted to post in case someone else is in the same boat. After I realized rails new would work in other directories, obviously something was going on with creating projects on the desktop.

Bottom line, make sure you have no file/directories in the directory where your running a rails command named script. There are probably other file/directory names that could cause conflict as well.

Upvotes: 2

Related Questions