安装捆绑包nokogiri Redmine错误Linux

时间:2018-04-06 16:01:37

标签: ruby bundle nokogiri

我需要一些帮助...

我一直在遵循这些说明: https://www.redmine.org/account/activate?token=2375a89a6b6f6a04b05bc941e93cb3ea82c15a89

我遇到了这个步骤的问题: 使用Gem bundler安装依赖项¶ 此步骤将查看Gemfile中指定的依赖项: %cd / var / www / redmine %bundle install

当我运行命令时,我收到此错误:

[fit54@u ~]$ cd /var/www/redmine
[fit54@u redmine]$ bundle install
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
/usr/share/gems/gems/psych-2.0.0/lib/psych.rb:98: warning: already initialized constant Psych::VERSION
/usr/share/ruby/psych.rb:98: warning: previous definition of VERSION was here
/usr/share/gems/gems/psych-2.0.0/lib/psych.rb:101: warning: already initialized constant Psych::LIBYAML_VERSION
/usr/share/ruby/psych.rb:101: warning: previous definition of LIBYAML_VERSION was here
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Using rake 12.3.1
Using i18n 0.7.0
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.8
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.1.0
Fetching nokogiri 1.6.8.1
Installing nokogiri 1.6.8.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /home/fit54/.gem/ruby/gems/nokogiri-1.6.8.1/ext/nokogiri
/usr/bin/ruby -r ./siteconf20180406-9964-oibzlr.rb extconf.rb
--use-system-libraries
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h
extconf failed, exit code 1

Gem files will remain installed in /home/fit54/.gem/ruby/gems/nokogiri-1.6.8.1
for inspection.
Results logged to
/home/fit54/.gem/ruby/extensions/x86_64-linux/nokogiri-1.6.8.1/gem_make.out

An error occurred while installing nokogiri (1.6.8.1), and Bundler
cannot continue.
Make sure that `gem install nokogiri -v '1.6.8.1'` succeeds before bundling.

In Gemfile:
rails was resolved to 4.2.8, which depends on
actionmailer was resolved to 4.2.8, which depends on
actionpack was resolved to 4.2.8, which depends on
actionview was resolved to 4.2.8, which depends on
rails-dom-testing was resolved to 1.0.9, which depends on
nokogiri

请让我知道我需要提供哪些其他信息,或者可以帮助我解决此问题。

1 个答案:

答案 0 :(得分:0)

sudo apt-get install ruby`ruby -e 'puts RUBY_VERSION[/\d+\.\d+/]'`-dev

没有ruby开发环境,这就是无法构建原生扩展的原因。试试上面的命令应该解决问题。