kyttcar kyttcar - 1 year ago 80
Ruby Question

Error While creating a new Rails Project in Rails 5.0.0.rc1

I am trying to create a new Rails project, based on chapter 3 of Michael Hartl's RubyonRails.

Anytime I try to create the sample_app I get this message:

$ rails _5.0.0.rc1_ new sample_app
/usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'railties' (= 5.0.0.rc1) - did find: [railties-4.2.2] (Gem::LoadError)
Checked in 'GEM_PATH=/usr/local/rvm/gems/ruby-2.3.0:/usr/local/rvm/gems/ruby-2.3.0@global', execute `gem env` for more information

It looks like it is not adding the new app gems.


You still have the railties gem from Rails 4. There's an updated version for Rails 5. When you use the rails new command you're using your system's gem versions, not those specified in the Gemfile. So you can try:

gem uninstall railties
gem install railties -v 5.0.0.rc1