我是 Rails 新手,目前正在阅读指南。 该指南指出:
Use a text editor to update the Gemfile needed by Bundler with the contents of Listing 2.1.
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
If Bundler complains about
no such file to load -- readline (LoadError)
try addinggem ’rb-readline’
to your Gemfile.)
我按照步骤进行操作,甚至添加了 gem 'rb-readline'
到Gemfile
,但显然找不到该文件,当我转到文本编辑器时,我确实看到了 Gemfile
本身。我注意到他们让我输入 gem 'rails', 3.2.3
我的 Rails 版本是 3.2.1,所以我尝试将其更改为 3.2.1,但也不起作用。
如有任何想法或建议,我们将不胜感激。
最佳答案
您只需更改应用程序的目录,然后运行bundle install
:)
关于ruby-on-rails - bundle 安装返回 "Could not locate Gemfile",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10012181/