我在Centos 5上安装RMagick rubygem时遇到问题.我已经按照http://rmagick.rubyforge.org/install2-linux.html中详述的步骤进行了操作,但是当我尝试:
sudo gem install rmagick
Run Code Online (Sandbox Code Playgroud)
结果是:
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.11.0. Can't find Magick-config in /usr/bin:/bin
*** 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 …Run Code Online (Sandbox Code Playgroud) 多年来我一直很喜欢使用 tmux。今天早上我的 macOS 机器上的自制软件将 tmux 的版本更新为 3.1。现在 tmux 无法启动。
这是我的.tmux.conf:
# Set the prefix from C-b to C-a
set -g prefix C-a
unbind C-b
# Set the delay between prefix and command
set -s escape-time 1
# Set the base index for windows and panes
set -g base-index 1
setw -g pane-base-index 1
# Reload the file with Prefix r
bind r source-file ~/.tmux.conf\; display "Reloaded!"
# Ensure that we can send Ctrl-A to other apps
bind C-a …Run Code Online (Sandbox Code Playgroud) 我支持的 Phoenix 应用程序使用两个不同的身份验证服务器进行 OAuth 身份验证。神秘的是,只有在我的开发环境中,它们才开始表现出意想不到的行为。
该代码使用OAuth2 十六进制包进行身份验证。
当尝试通过 获取令牌时OAuth2.Client.get_token/1,会返回一个错误,其中包含元组而不是字符串。元组的值为{:option, :server_only, :honor_cipher_order}。我一直无法找出为什么会发生这种情况,也无法找出元组的含义。
任何帮助,将不胜感激。
注意:这个问题涉及如何让捆绑程序使用 chruby 和 .ruby-version 设置的 Ruby 版本?。
使用chruby我在 macOS 上安装了 Ruby 1.8.7:
$ ruby -v
ruby 1.8.7 (2013-06-27 patchlevel 374) [i686-darwin17.4.0]
Run Code Online (Sandbox Code Playgroud)
另外,我曾经gem update --system 1.8.30安装过特定版本的 RubyGems,希望它是兼容的。这看起来安装正确:
$ gem --version
1.8.30
Run Code Online (Sandbox Code Playgroud)
但是,我的 RubyGems 环境显示的 Ruby 版本不正确(2.5.0):
$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.30
- RUBY VERSION: 2.5.0 (2017-12-25 patchlevel 0) [x86_64-darwin17]
- INSTALLATION DIRECTORY: /Users/keithpitty/.gem/ruby/1.8.7
- RUBY EXECUTABLE: /usr/local/opt/ruby/bin/ruby
- EXECUTABLE DIRECTORY: /Users/keithpitty/.gem/ruby/1.8.7/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-17
- GEM PATHS: …Run Code Online (Sandbox Code Playgroud) 我在为PostgreSQL 11.2数据库构建Rails应用程序时遇到麻烦。
这是.travis.yml文件:
rvm:
- 2.6.1
dist: xenial
services:
- postgresql
addons:
postgresql: "11.2"
apt:
packages:
- postgresql-11
before_script:
- psql --version
- psql -c 'create database kpdotcom_test;' -U postgres
- cp config/database.yml.travis config/database.yml
- bundle exec rake db:schema:load
Run Code Online (Sandbox Code Playgroud)
但是,构建失败:
任何建议将不胜感激。