问题描述
我是Rails的新手,目前正在阅读指南。
指南指出:
I'm new to Rails and am currently working through a guide.The guide states:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
group :development do
gem 'sqlite3', '1.3.5'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.4'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
end
gem 'jquery-rails', '2.0.0'
group :production do
gem 'pg', '0.12.2'
end
然后我们安装并包含宝石使用捆绑安装
命令:
We then install and include the gems using the bundle install
command:
$ bundle install --without production
如果Bundler抱怨没有此类文件可以加载- readline
尝试将
(LoadError) gem'rb-readline'
添加到您的Gemfile中。)
If Bundler complains about no such file to load -- readline (LoadError)
try adding gem ’rb-readline’
to your Gemfile.)
我遵循的步骤甚至将 gem'rb-readline'
添加到 Gemfile
,但是显然找不到该文件,当我转到文本编辑器时,确实看到了 Gemfile
本身。我注意到他们让我放了 gem'rails',3.2.3
,而我的Rails版本是3.2.1,所以我尝试将其更改为3.2.1,但这没有。
I followed the steps even adding on gem 'rb-readline'
to the Gemfile
, but apparently the file can't be found and when I go to my text editor I do see the Gemfile
itself. I noticed that they made me put gem 'rails', 3.2.3
and my version of Rails is 3.2.1 so I tried changing it to 3.2.1 but that didn't work either.
任何想法或建议都将不胜感激。
Any thoughts or advice would be much appreciated.
推荐答案
您只需要将目录更改为您的应用,然后运行捆绑安装
:)
You just need to change directories to your app, THEN run bundle install
:)
这篇关于捆绑安装返回“无法找到Gemfile”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!