Ruby on rails Rails-无法创建新的Rails应用程序

Ruby on rails Rails-无法创建新的Rails应用程序,ruby-on-rails,ruby,Ruby On Rails,Ruby,我已经有了一个运行在Rails 5.0.1中的live Rails应用程序。现在,当我尝试创建新的rails版本时,我得到以下错误 Could not find proper version of railties (4.2.7.1) in any of the sources Run `bundle install` to install missing gems. Could not find spork-1.0.0rc4 in any of the sources 当我运行“bundl

我已经有了一个运行在Rails 5.0.1中的live Rails应用程序。现在,当我尝试创建新的rails版本时,我得到以下错误

Could not find proper version of railties (4.2.7.1) in any of the sources
Run `bundle install` to install missing gems.
Could not find spork-1.0.0rc4 in any of the sources
当我运行“bundle install”时,出现以下错误

Could not find proper version of railties (4.2.7.1) in any of the sources
Run `bundle install` to install missing gems.
Could not find spork-1.0.0rc4 in any of the sources
如何解决此错误

我的系统只有Rails 5.0.1版和Ruby 2.3.1版


PS:当我将Ruby版本保存在2.2.5中时,我能够成功创建rails应用程序。

如果您试图创建新的rails应用程序,请尝试在新文件夹中设置它

如果您试图更新当前项目的rails版本,请在
Gemfile
中更新rails版本,然后运行
bundle update rails

准备给你的命令

Could not find proper version of railties (4.2.7.1) in any of the sources
Run `bundle install` to install missing gems.
使用
bundle exec
可以解决您的问题

如果您使用类似于
rbenv
的工具来管理您的ruby版本,您可能需要更新
.ruby版本
文件,然后运行

rbenv install
gem install bundler
bundle install

要安装新版本的ruby、bundler和您的gems。

请尝试
bundle update