0

Ransack gem を使用していますが、変更したいと考えています。そのため、Ransack gem フォルダーを C ドライブからフォルダーにコピーしvendor/plugins/static_gemて編集しようとしていますが、サーバーを起動すると次のようなエラーが表示されます。

    D:/Shrikant/Ruby Projects/fIT_Arms/vendor/static_gem/ransack-0.7.0/ransack.gemsp
     ec:25:in ``': No such file or directory - git ls-files (Errno::ENOENT)
     from D:/Shrikant/Ruby Projects/fIT_Arms/vendor/static_gem/ransack-0.7.0/
     ransack.gemspec:25:in `block in <main>'

          from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1368:
    in `initialize'
            from D:/Shrikant/Ruby Projects/fIT_Arms/vendor/static_gem/ransack-0.7.0/ransac

k.gemspec:5:in `new'
        from D:/Shrikant/Ruby Projects/fIT_Arms/vendor/static_gem/ransack-0.7.0/ransack.gemspec:5:in `<main>'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler.rb:280:in `eval'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler.rb:280:in `rescue in block in load_gemspec'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler.rb:275:in `block in load_gemspec'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler.rb:273:in `chdir'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler.rb:273:in `load_gemspec'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/source.rb:340:in `block in load_spec_files'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/source.rb:339:in `each'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/source.rb:339:in `load_spec_files'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/source.rb:372:in `local_specs'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:430:in `block in converge_locked_specs'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:419:in `each'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:419:in `converge_locked_specs'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:180:in `resolve'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:127:in `specs'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:172:in `specs_for'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:161:in `requested_specs'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/environment.rb:23:in `requested_specs'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runtime.rb:11:in `setup'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler.rb:107:in `setup'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/setup.rb:7:in `<top (required)>'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
        from D:/Shrikant/Ruby Projects/fIT_Arms/config/boot.rb:6:in `<top (required)>'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from script/rails:5:in `<main>'

これらの行でエラーが発生します

s.files         = `git ls-files`.split("\n")
  s.test_files    = `git ls-files -- {test,spec,features}/*`.split("\n")
  s.executables   = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
  s.require_paths = ["lib"]

私に何ができる?

4

1 に答える 1

0

これが問題かどうかはわかりませんが、パス「D:/Shrikant/Ruby Projects/fIT_A」のスペースを削除して、もう一度やり直してください

つまり、Ruby Projects フォルダーの名前を ruby​​_projects に変更します。

あなたの開発環境は何ですか

于 2012-10-17T12:26:16.237 に答える