我正在使用 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"]
我能做些什么?