当我输入
rails _4.2.0.rc2_ new hello_app
我收到此错误
/Library/Ruby/Site/2.0.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'railties' (= 4.2.0.rc2) - did find: [railties-4.1.8] (Gem::LoadError)
Checked in 'GEM_PATH=/Users/a11/.gem/ruby/2.0.0:/Library/Ruby/Gems/2.0.0:/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0', execute `gem env` for more information
from /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:324:in `to_spec'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from /usr/bin/rails:22:in `<main>'
我尝试使用
安装railsties 4.2.0.rc2gem install railties --pre
答案 0 :(得分:1)
如果您想尝试使用新的rails版本,则需要执行
gem install rails --pre
而不是
gem install railties --pre
将Rails框架作为其核心,但并非总体而言。有关详细信息,请参阅official documentation。
答案 1 :(得分:0)
我完全重新安装了导轨
gem uninstall railties -v 4.2.0.rc2
sudo gem install rails -v 4.2.0.rc2
并解决了它。