Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 257
Caleb Sayre Avatar asked Dec 11 '22 16:12

Caleb Sayre


1 Answers

Run gem update rails first, then bundle update

like image 175
Kaushlendra Tomar Avatar answered May 18 '23 15:05

Kaushlendra Tomar