当前位置 : 主页 > 编程语言 > ruby >

ruby-on-rails – Rails new给出“无法在任何来源中找到适当版本的铁路(4.2.5.1)”错误

来源:互联网 收集:自由互联 发布时间:2021-06-23
我试图使用Rails 5.0.0.rc1与 Ruby 2.3.1.但是,如果我尝试在“编程”目录中创建一个新项目,我会得到:  ➜ ~/Documents/Programming rails new fooCould not find proper version of railties (4.2.5.1) in any of the
我试图使用Rails 5.0.0.rc1与 Ruby 2.3.1.但是,如果我尝试在“编程”目录中创建一个新项目,我会得到:

 ➜  ~/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.

如果我做一个gem列表,我在5.0.0.rc1中安装了唯一的rails版本.有趣的是当我执行rails -v时遇到相同的错误,但是当我从我的主目录执行时却不这样做:

 ➜  ~  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.

我尝试卸载并重新安装rails和railties,结果相同.我正在使用rvm而且必须这样做

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

安装nokogiri.

首先运行gem update rails,然后捆绑更新
网友评论