Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/55.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 如何在win 7上安装caldecott?_Ruby On Rails_Ruby_Rubygems_Gem - Fatal编程技术网

Ruby on rails 如何在win 7上安装caldecott?

Ruby on rails 如何在win 7上安装caldecott?,ruby-on-rails,ruby,rubygems,gem,Ruby On Rails,Ruby,Rubygems,Gem,我已经创建了一个,我想上传到phpfog上,但是在第一步上传我的数据库时遇到了麻烦,我赢得了7 x64,我用ruby下载并安装了命令提示符,同时创建了一个隧道: C:\Ruby200\devkit>gem install caldecott --platform=ruby Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while.

我已经创建了一个,我想上传到phpfog上,但是在第一步上传我的数据库时遇到了麻烦,我赢得了7 x64,我用ruby下载并安装了命令提示符,同时创建了一个隧道:

 C:\Ruby200\devkit>gem install caldecott --platform=ruby
    Temporarily enhancing PATH to include DevKit...
    Building native extensions.  This could take a while...
    ERROR:  Error installing caldecott:
            ERROR: Failed to build gem native extension.

        C:/Ruby200/bin/ruby.exe extconf.rb
    creating Makefile

    make
    generating generator-i386-mingw32.def
    compiling generator.c
    generator.c: In function 'cState_aref':
    generator.c:632:5: warning: variable 'state' set but not used [-Wunused-but-set-
    variable]
    generator.c: In function 'isArrayOrObject':
    generator.c:867:5: warning: suggest parentheses around '&&' within '||' [-Wparen
    theses]
    linking shared-object json/ext/generator.so

    make install
    /usr/bin/install -c -m 0755 generator.so C:/Ruby200/lib/ruby/gems/2.0.0/gems/jso
    n-1.6.8/ext/json/ext/json/ext
    /usr/bin/install: cannot create regular file `C:/Ruby200/lib/ruby/gems/2.0.0/gem
    s/json-1.6.8/ext/json/ext/json/ext': No such file or directory
    make: *** [install-so] Error 1


    Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/json-1.6.
    8 for inspection.
    Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/json-1.6.8/ext/json/ext/ge
    nerator/gem_make.out

    C:\Ruby200\devkit>gem install caldecott --platform=ruby


`

Ruby 2.0.0版本出现此错误。降级到Ruby 1.9.3

我有Win7 x64、Ruby 2.0.0、DevKit(DevKit-mingw64-32-4.7.2-20130224-1151)

我也面临同样的问题。我的解决方案:

  • 从github下载gem源代码-
  • 解压缩到C:\caldecott(例如)
  • 打开文件caldecott.gempec并将json依赖项的版本更改为“~>1.7”
  • 打开命令提示符,移动到gem源目录并执行以下操作:

    gem build caldecott.gemspec

    gem安装caldecott-0.0.5.gem


  • 以上就是你所说的
    4是什么意思。打开命令提示符,移动到gem源目录并执行: