我在我购买的新计算机上运行railsinstaller,然后为了让这台计算机运行所有旧的rails项目,我复制了所有的gem依赖项。但是,出于某种原因,“bundle install --local”不起作用,这很奇怪,因为这种复制rails项目和gems的特殊方式在过去运行得很好。我跑了“宝石环境”并得到了这个:
C:\Users\Owner\rails_projects\depot>gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.28
- RUBY VERSION: 1.9.3 (2013-11-22 patchlevel 484) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/RailsInstaller/Ruby1.9.3/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1
- C:/Users/Owner/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
我尝试了更具体的尝试“gem install rake-10.2.2 --local”,我收到以下错误:
ERROR: Could not find a valid gem 'rake-10.2.2' (>= 0) in any repository
最后,我发现在运行“gem list”时,C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems中不到一半的实际宝石出现了。在弄清楚如何检测我的宝石时,任何帮助都会很感激。谢谢。