Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 铁路结构:找不到diff-lcs-1.1.3_Ruby On Rails_Ruby_Ruby On Rails 3_Bundler_Railstutorial.org - Fatal编程技术网

Ruby on rails 铁路结构:找不到diff-lcs-1.1.3

Ruby on rails 铁路结构:找不到diff-lcs-1.1.3,ruby-on-rails,ruby,ruby-on-rails-3,bundler,railstutorial.org,Ruby On Rails,Ruby,Ruby On Rails 3,Bundler,Railstutorial.org,我在玩那个教程,执行时: rails generate rspec:install 我明白了: Could not find diff-lcs-1.1.3 in any of the sources Run 'bundle install' to install missing gems. 运行捆绑包显示时: ... * builder (3.0.0) * bundler (1.1.rc) * diff-lcs (1.1.3) * erubis (2.7.0) * hike (1.2.1)

我在玩那个教程,执行时:

rails generate rspec:install
我明白了:

Could not find diff-lcs-1.1.3 in any of the sources
Run 'bundle install' to install missing gems.
运行捆绑包显示时:

...
* builder (3.0.0)
* bundler (1.1.rc)
* diff-lcs (1.1.3)
* erubis (2.7.0)
* hike (1.2.1)
...
我确保它已经安装好了。。。。 我可以在系统中找到它等等


有什么想法吗?从来没有真正研究过ruby,所以这可能就是我失败的原因,哈哈

您应该首先运行
bundle install
,如上面的错误消息所述

运行
bundle安装
bundle安装--不首先运行生产

然后运行
rails g rspec:install

我强烈建议您检查:

然后运行
捆绑安装

我还想知道您是否成功安装了RVM


如果您未能安装gems,我认为您应该重新检查上一部分。

我不确定这是否一定是解决此问题的答案,但我收到了此错误消息,并在命令的开头添加了
bundle exec
,效果良好。