ruby-on-rails - bundle 安装返回 "Could not locate Gemfile"

标签 ruby-on-rails installation bundle gemfile

我是 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 adding gem ’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/

相关文章:

javascript - 在 CoffeeScript 中解析 Rails 模型错误

linux - 在 ubuntu 中安装 libpulse-dev 包时出错

ruby-on-rails - link_to中的“数据类型”参数

css - 在 Rails 中使用 CSS

windows - 如何从 Visual Studio 2010 安装程序运行 schtasks.exe?

visual-studio - Visual Studio 2019 离线布局更新忽略 '--noUpdateInstaller'

java - maven-bundle-plugin 嵌入依赖项无法将包部署到 OSGi 容器中

mysql - Magento bundle 产品 SQLSTATE[HY000] : General error: 2006 MySQL server has gone away

asp.net - 如何在 asp.net BundleConfig 中忽略特定包以进行优化

ruby-on-rails - 带有设计的未知属性