我是菜鸟。这是我尝试时的问题。
构建原生扩展。这可能需要一段时间... 错误:安装导轨时出错:错误:无法构建 gem 本机扩展。
current directory: /var/lib/gems/2.3.0/gems/nio4r-1.2.1/ext/nio4r
Run Code Online (Sandbox Code Playgroud)
/usr/bin/ruby2.3 -r ./siteconf20160630-19108-12sbtb7.rb extconf.rb mkmf.rb 在 /usr/lib/ruby/include/ruby.h 找不到 ruby 的头文件
extconf 失败,退出代码 1
Gem 文件将保留安装在 /var/lib/gems/2.3.0/gems/nio4r-1.2.1 中以供检查。结果记录到 /var/lib/gems/2.3.0/extensions/x86-linux/2.3.0/nio4r-1.2.1/gem_make.out
几天前我刚刚在 rails 上安装了 ruby,每次在控制台中创建一个新项目时,我都会收到以下消息:
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, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform mingw, mswin, x64_mingw, jruby`.
Run Code Online (Sandbox Code Playgroud)
但是当我尝试安装时:
bundle lock --add-platform mingw
Run Code Online (Sandbox Code Playgroud)
我收到了这条消息:
Could not locate Gemfile
Run Code Online (Sandbox Code Playgroud)
你们知道我对这条消息做了什么吗???
我已经使用 rvm 在 rails 上安装了 ruby。我正在尝试捆绑安装我在以前的电脑上安装的旧项目,但是当我运行 bundle install 命令时出现以下错误:
Installing json 1.8.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/florin/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20151003-5986-vme5ji.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.so
/usr/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status
make: *** [generator.so] Error 1
make failed, exit code 2
Gem files will remain installed in /home/florin/.rvm/gems/ruby-2.2.3/gems/json-1.8.3 for inspection.
Results logged to /home/florin/.rvm/gems/ruby-2.2.3/extensions/x86_64-linux/2.2.0/json-1.8.3/gem_make.out
An error occurred while installing json (1.8.3), …
Run Code Online (Sandbox Code Playgroud)