Caleb Sayre
Caleb Sayre

Reputation: 401

Rails new gives "Could not find proper version of railties (4.2.5.1) in any of the sources" error

I am trying to use Rails 5.0.0.rc1 with Ruby 2.3.1. However, if I try to create a new project within my "programming" directory, I get this:

 ➜  ~/Documents/Programming  rails new foo
Could not find proper version of railties (4.2.5.1) in any of the sources
Run `bundle install` to install missing gems.

If I do a gem list, the only rails version I have installed in 5.0.0.rc1. What is interesting is I get the same error when I do rails -v, but do not when I do it from my home directory:

 ➜  ~  rails -v
Rails 5.0.0.rc1
 ➜  ~  cd Documents/Programming
 ➜  ~/Documents/Programming  rails -v
Could not find proper version of railties (4.2.5.1) in any of the sources
Run `bundle install` to install missing gems.

I have tried uninstalling and reinstalling both rails and railties with the same result. I am using rvm and had to do

gem install nokogiri -- --use-system-libraries

to install nokogiri.

Upvotes: 4

Views: 11428

Answers (2)

MitianDev
MitianDev

Reputation: 1

THanks I didn't need to delete anything It works just using bundle update at directory of my project

try it

Upvotes: -1

Kaushlendra Tomar
Kaushlendra Tomar

Reputation: 1440

Run gem update rails first, then bundle update

Upvotes: 13

Related Questions