简体   繁体   English

捆绑安装不适用于gem'sqlite'和'pg'

[英]Bundle install not working with gem 'sqlite' and 'pg'

I was about to deploy my app so i was updating the gem file to be. 我将要部署我的应用程序,因此我正在更新gem文件。

group :development do
  gem ‘sqlite3’
end

group :production do
  gem ‘pg’
  gem 'rails_12factor'
end

When i run the bundle install i get an error saying 'Undefined local variable or method `'sqlite3'' for Gemfile' which is weird because previously sqlite was the only gem in the file. 当我运行软件包安装程序时,我收到一条错误消息:“ Gemfile的未定义局部变量或方法'sqlite3”,这很奇怪,因为以前的sqlite是文件中唯一的gem。

Thanks 谢谢

Use single ' or double quotes " around gem names like you've done for rails_12factor . Update your Gemfile as follows: 使用单'或双引号"就像你所做各地的宝石名称rails_12factor更新您的Gemfile如下:

group :development do
  gem 'sqlite3'
end

group :production do
  gem 'pg'
  gem 'rails_12factor'
end

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM