Unable to create a new Rails project: `require ': unable to load such a file - / config / boot (LoadError)

I am trying to create a new Rails project,

Jakes-Air:code JakeWengroff$ rails new MyNewProject -T 

but I keep getting this error:

 script/rails:5:in `require': cannot load such file -- /Users/JakeWengroff/config/boot (LoadError) from script/rails:5:in `<main>' 

Checking Ruby version, ruby -v , I get

 ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0] 

When I want to check the version of Rails, rails -v , I get the same error as when initializing a new Rails project:

 script/rails:5:in `require': cannot load such file -- /Users/JakeWengroff/config/boot (LoadError) from script/rails:5:in `<main>' 

So, I reinstalled Rails, gem install rails -v 4.2.0 :

 Successfully installed rails-4.2.0 Parsing documentation for rails-4.2.0 Done installing documentation for rails after 1 seconds 1 gem installed 

I also did bundle install and bundle check , and everything was fine. But the error persisted.

Having looked at some other, similar issues, I thought it was related to gemset. On the RVM website, I decided to try the rvm gemset create rails420 , which gave me

 ruby-2.1.2 - #gemset created /Users/JakeWengroff/.rvm/gems/ ruby-2.1.2@rails420 ruby-2.1.2 - #generating rails420 wrappers.............. 

But then trying rails -v and rails new MyNewProject -T still rails new MyNewProject -T original error.

Any help is greatly appreciated.
Thank you in advance.

+6
source share
1 answer

I had a similar problem, for me it turned out to be a problem with ruby. I installed a different version of Ruby with RVM and installed rails with this different version of Ruby.

 rvm install 2.2.2 gem install rails 

I would not recommend this solution as sustainable, but I could not solve it differently and at least it will make you go again.

0
source

All Articles