在Windows

时间:2016-07-16 18:41:04

标签: ruby-on-rails windows rubygems

  

构建原生扩展。这可能需要一段时间......

     

错误:安装rails时出错:           错误:无法构建gem原生扩展。

     

C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20160716-3500-cejnk5.rb   extconf.rb

     

无效参数 - C:/Ruby22-x64/bin/ruby.exe -r   ./siteconf20160716-3500-cejnk5。 rb extconf.rb 2>& 1

     

Gem文件将保持安装状态   C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/websoc ket-driver-0.6.4 for   检查。

     

记录结果   C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0   /websocket-driver-0.6.4/gem_make.out

1 个答案:

答案 0 :(得分:0)

这可能是很多事情,因为Windows在运行Rails时非常挑剔。我的头顶:

  1. 当您需要32位时,您是否意外安装了64位版本的Ruby或Rails?您可以通过在命令行中键入ruby -v并查看您的版本是否为i386或x64以及检查系统信息以查看您的系统是否为32来进行测试。你可以在这里获得不同版本的Ruby: http://rubyinstaller.org/downloads
  2. 环境变量路径中指向C:/Ruby22-x64/bin/ruby.exe的链接是什么? Environment variable path
  3. 您是否正在安装与Windows或当前系统设置无法正常工作的Rails Gem版本?可能值得尝试public class Pro1point1 { public static void main(String[] args){ int i,j,k,l,space=29; for(i=1;i<=5;i++){ //First print the upper half triangle. for(j=1;j<=space;j++){ System.out.print(" "); } for(k=1;k<=i;k++){ System.out.print(k); } for(l=i-1;l>=1;l--){ System.out.print(l); } space--; System.out.println(); } //Now Print the lower half triangle. space=29; for(i=4;i>=1;i--){ for(j=space;j>=1;j--){ System.out.print(""); } for(k=1;k<=i;k++){ System.out.print(k); } for(l=i-1;l>=1;l--){ System.out.print(l); } space++; System.out.println(); } } } (适用于我的Windows设置)或其他特定版本,看看是否有效。