ruby-on-rails-3 – 如何在不在本地安装PostgreSQL的情况下部署
发布时间:2020-12-17 03:45:48 所属栏目:百科 来源:网络整理
导读:对于Rails 3.1应用程序,我想使用SQLite在本地开发并部署到Heroku(需要PostgreSQL). 我已经设置了我的gemfile group :development,:test do gem 'sqlite3'end 我可以成功推送到Heroku,但应用失败了 "Please install the postgresql adapter: `gem install act
对于Rails 3.1应用程序,我想使用SQLite在本地开发并部署到Heroku(需要PostgreSQL).
我已经设置了我的gemfile group :development,:test do gem 'sqlite3' end 我可以成功推送到Heroku,但应用失败了 "Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.)" 如果我将pg gem添加到我的Gemfile并运行bundle install,我得到: "ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) /opt/local/bin/ruby extconf.rb checking for pg_config . . . not found" 因为我没有在本地安装PostgreSQL. 我不想在本地安装PostgreSQL. 有没有办法部署到Heroku而无需在本地安装PostgreSQL? 解决方法bundle install --without production 应该做的伎俩.有关详细信息,请参见docs. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |