- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试关注 this tutorial about Shopify Apps .首先我尝试:
bundle install
但它给我这个错误
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /tmp/bundler20171024-12759-18v2l7apg-0.21.0/gems/pg-0.21.0/ext
/usr/bin/ruby2.3 -r ./siteconf20171024-12759-2yizk4.rb extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for
building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for
building a client-side application.
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)2.3
--with-pg
--without-pg
--enable-windows-cross
--disable-windows-cross
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/tmp/bundler20171024-12759-18v2l7apg-0.21.0/extensions/x86_64-linux/2.3.0/pg-0.21.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20171024-12759-18v2l7apg-0.21.0/gems/pg-0.21.0 for
inspection.
Results logged to
/tmp/bundler20171024-12759-18v2l7apg-0.21.0/extensions/x86_64-linux/2.3.0/pg-0.21.0/gem_make.out
An error occurred while installing pg (0.21.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.21.0'` succeeds before bundling.
In Gemfile:
pg
但如果我尝试:
gem install pg -v '0.21.0'
它也给我错误:
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/pg-0.21.0/ext
/usr/bin/ruby2.3 -r ./siteconf20171024-12993-1t8i3d6.rb extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)2.3
--with-pg
--without-pg
--enable-windows-cross
--disable-windows-cross
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/pg-0.21.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/pg-0.21.0 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/pg-0.21.0/gem_make.out
我读过
sudo apt-get install libpq-dev
应该可以,但是,是的...错误:
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libpq-dev : Depends: libssl-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我正在使用 Ubuntu 16.04 LTS。 (这是 gemfile:)
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.4'
# Use postgresql as the database for Active Record
gem 'pg', '~> 0.18'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'shopify_app', '~> 7.0.0'
我该怎么办?谢谢。
最佳答案
其实这对我有用
sudo apt-get install libpq-dev ruby-dev
它要求我安装两个包 libpq-dev
和 ruby-dev
关于ruby - 安装pg(0.21.0)时出错,Bundler无法继续,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46913424/
运行马里奥游戏时此文件出现错误当我尝试运行文件 super_mario.py 时,我从以下链接( https://github.com/Ja1r0/DQN-play-SuperMario )下载了代码
来自pg module doc ,似乎连接到 PG 数据库的正确方法是使用: conn = PG::Connection.open(dbname: 'test') 但是,我发现 other examp
嘿,所以我试图让 Nodejs Koa 使用 Koa-pg 模块与 postgres 对话,但我一直收到“找不到模块 pg”错误。我已尝试遵循 koa-pg 示例,但效果不佳……因此,我们将不胜感激任
我需要一些关于 pg npm 的帮助。 我已经阅读了许多文章和示例,并且对以正确的方式使用 pg 池感到非常困惑。许多文章都是我读过的旧文章。 我想向您展示我的一些代码以及我是如何围绕 db 构建所有
我有一个 postgresql 表,每天都有数千条时间序列数据。我有一个应用程序允许用户检索这些数据。查询可能需要 200 毫秒到 30 秒,具体取决于时间范围,因此这些查询必须是可取消的,以避免对生
我不确定我的 heroku postgres 发生了什么,但是当我尝试使用命令行访问它时 pg:info和 pg:psql ,我得到“未找到”。 我什至单击 heroku 上的按钮也为我的应用程序创建
给定一个包含 jsonb[] 类型列的表,如何将 json 数组插入到该列中? 使用提供的格式化程序 :array、:json 在这种情况下将不起作用 - 除非我缺少正确的组合或其他内容。 const
我是 node 和 pg-promise 的新手,一直无法弄清楚如何将三个相关查询的结果合并到一个 json 结果中。 给定三个相关表: 父实体 create table parent ( id bi
在开发时,我需要拉取最新的数据库,以便我知道我正在使用最新的数据。但是,我们保留了一张表,里面装满了我不需要费心下载的文件,因为它是一个非常大的表。 我知道 pg_dump 允许自定义参数,这些参数可
当我运行时(作为 root) gem install pg -v '0.12.0' -- --with-pg-config=/usr/pgsql-9.1/bin/pg_config 我得到以下输出:
我在尝试使用annotation@type(type=“pg uuid”)时遇到了一些问题。它抛出此异常: Caused by: java.lang.ClassNotFoundException: C
我按照这个线程 (Cannot install pg gem in Mavericks with Postgres.app) 获得了 'pg' gem 成功地与 Mavericks 上的 Postgr
正在获取 pg:找不到模型 id="," 的 dst 值 我定义了以下模型 // omitting fields which don't seem relevant to the issue // c
如何在Ruby pg gem 中使用PG::Connection 类的公共(public)实例方法send_query? 它可以帮助加快这样的程序的执行时间吗? a = [1,2,3,4,5,6,..
大家好,我一直在尝试使用 capistrano 部署我的应用程序。但是,我始终收到以下错误,并且不知道如何解决它。 * executing "cd /var/www/html/mysite.com/r
在我的 TestLogger 类中,require 'pg'(版本 0.16.0)返回 true,但 PGconn 未注册。 到目前为止,只有服务器有这个问题,而且只在TestLogger。其他确实需
使用 VSCode。为 Windows 安装了最新的 Node.js(首次用户)以及所需的模块,其中一个是“pg”(npm install pg) 在我的脚本顶部有这样的内容:const pg = r
我写了一个简单的脚本:。This.db对应于一个Pool对象。所以我在数据库中选择了一个特定的对象,在它的旁边我试图取回相同的对象,但这次使用了creation_date字段。。我尝试了许多结果变量更
我做了一个简单的脚本:。This.db对应于Pool对象。因此,我使用他的ID在我的数据库中选择了一个特定的对象。在它旁边,我试图取回相同的对象,但这次使用的是Creation_Date字段。。我尝试
我希望执行以下操作。 使用 group by 查询查询大型表以执行值汇总。 通过例程运行这些记录以添加一些附加数据 将它们高效地插入数据库。 我尝试使用 pg-query-stream 将数据作为流读
我是一名优秀的程序员,十分优秀!