0
我正在使用Ransack gem,但我想對其進行修改。因此,我從C盤到vendor/plugins/static_gem
文件夾複製洗劫寶石文件夾,並嘗試對其進行編輯,但是當我啓動服務器時,它給我的錯誤是:修改Ransack 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"]
我該怎麼辦?