问题:
Ruby代码  
  1. F:\RailsApp\blog>ruby script/server
  2. => Booting WEBrick...
  3. NOTE: Gem.source_index is deprecated, use Specification. It will be removed on o
  4. r after 2011-11-01.
  5. Gem.source_index called from D:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/r
  6. ails/gem_dependency.rb:21.
  7. NOTE: Gem::SourceIndex#refresh! is deprecated with no replacement. It will be re
  8. moved on or after 2011-11-01.
  9. Gem::SourceIndex#refresh! called from D:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.
  10. 2.2/lib/rails/vendor_gem_source_index.rb:34.
  11. NOTE: Gem::SourceIndex#load_gems_in is deprecated with no replacement. It will b
  12. e removed on or after 2011-11-01.
  13. Gem::SourceIndex#load_gems_in called from D:/Ruby187/lib/ruby/site_ruby/1.8/ruby
  14. gems/source_index.rb:322.
  15. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It wi
  16. ll be removed on or after 2011-11-01.
  17. Gem::SourceIndex#add_spec called from D:/Ruby187/lib/ruby/site_ruby/1.8/rubygems
  18. /source_index.rb:127.
  19. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It wi
  20. ll be removed on or after 2011-11-01.
  21. Gem::SourceIndex#add_spec called from D:/Ruby187/lib/ruby/site_ruby/1.8/rubygems
  22. /source_index.rb:127.
  23. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It wi
  24. ll be removed on or after 2011-11-01.
  25. Gem::SourceIndex#add_spec called from D:/Ruby187/lib/ruby/site_ruby/1.8/rubygems
  26. /source_index.rb:127.
  27. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It wi
  28. ll be removed on or after 2011-11-01.
  29. Gem::SourceIndex#add_spec called from D:/Ruby187/lib/ruby/site_ruby/1.8/rubygems
  30. /source_index.rb:127.
  31. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It wi
  32. ll be removed on or after 2011-11-01.
  33. Gem::SourceIndex#add_spec called from D:/Ruby187/lib/ruby/site_ruby/1.8/rubygems
  34. /source_index.rb:127.
  35. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It wi
  36. ll be removed on or after 2011-11-01.
  37. Gem::SourceIndex#add_spec called from D:/Ruby187/lib/ruby/site_ruby/1.8/rubygems
  38. /source_index.rb:127.
  39. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It wi
  40. ll be removed on or after 2011-11-01.
  41. Gem::SourceIndex#add_spec called from D:/Ruby187/lib/ruby/site_ruby/1.8/rubygems
  42. /source_index.rb:127.
  43. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It wi
  44. ll be removed on or after 2011-11-01.
  45. Gem::SourceIndex#add_spec called from D:/Ruby187/lib/ruby/site_ruby/1.8/rubygems
  46. /source_index.rb:127.
  47. NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It will be
  48. removed on or after 2011-11-01.
  49. Gem::SourceIndex#initialize called from D:/Ruby187/lib/ruby/gems/1.8/gems/rails-
  50. 2.2.2/lib/rails/vendor_gem_source_index.rb:100.
我的开发环境是ruby1.8.7 rails 2.2.2
解决办法就是执行: gem update --system, 再次重启就好了, 因为我之前用的是Rails3, rubygems的版本用的
是1.8.X,装了rails2.2.2和ruby1.8.7以后,没有更新rubygems的版本
Ruby代码  
  1. F:\RailsApp\blog>gem update --system 1.3.7
  2. Updating rubygems-update
  3. Fetching: rubygems-update-1.3.7.gem (100%)
  4. Successfully installed rubygems-update-1.3.7
  5. Installing RubyGems 1.3.7
  6. RubyGems 1.3.7 installed
  7. 锘?== 1.6.2 / 2011-03-08
  8. Bug Fixes:
  9. * require of an activated gem could cause activation conflicts.  Fixes
  10. Bug #29056 by Dave Verwer.
  11. * `gem outdated` now works with up-to-date prerelease gems.
  12. ------------------------------------------------------------------------------
  13. RubyGems installed the following executables:
  14. D:/Ruby187/bin/gem
  15. RubyGems system software updated
  16. F:\RailsApp\blog>ruby script/server
  17. => Booting WEBrick...
  18. => Rails 2.2.2 application started on http://0.0.0.0:3000
  19. => Ctrl-C to shutdown server; call with --help for options
  20. [2012-04-26 22:32:09] INFO  WEBrick 1.3.1
  21. [2012-04-26 22:32:09] INFO  ruby 1.8.7 (2011-12-28) [i386-mingw32]
  22. [2012-04-26 22:32:09] INFO  WEBrick::HTTPServer#start: pid=1252 port=3000

转自:http://michael-roshen.iteye.com/blog/1500264

Gem.source_index is deprecated相关推荐

  1. freetype2 下载编译以及测试代码

    源码: https://sourceforge.net/projects/freetype/files/freetype2 下载解压后,进入源码目录执行cmake-gui,界面中配置源码目录与编译目录 ...

  2. The Elastic Stack (ELK)7.14:简单配置到SSL配置教程(带Beats部署)

    文章目录 一.简介 二.环境 1.安装Docker.Docker Compose 三.部署Elastic Stack(ELK) 1.部署ElasticSearch(Distributed, RESTf ...

  3. 如何處理不同版本的 Gem 執行檔,以 Rake 0.9.0 地雷為例

    Update: Rake 0.9.1 回復了這個不相容變更,改成加上 Deprecation 警告:Global access to Rake DSL methods is deprecated. P ...

  4. ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARC

    sudo gem install jekyll安装报错 Building native extensions. This could take a while... ERROR: Error inst ...

  5. DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5

    原来的python脚本是在Ubuntu 14.04 64bit上写的,运行没有问题,但是在CentOS 6.3上的crontab中定时执行时,每次都报 DeprecationWarning: the ...

  6. 【FFmpeg】解决警告warning: xxx is deprecated [-Wdeprecated-declarations]的方法

    1.问题描述 编译FFmpeg程序时,经常报一些关于"deprecated"的警告信息,具体内容如下: decode.cpp:28:2: warning: 'void av_reg ...

  7. php解决 mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysq

    微信小程序开发交流qq群   173683895    承接微信小程序开发.扫码加微信. The mysql extension is deprecated and will be removed i ...

  8. 解决 The mysql extension is deprecated and will be r

    为什么80%的码农都做不了架构师?>>>    解决 The mysql extension is deprecated and will be removed in the fut ...

  9. neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead

    1.现象描述: 以前在测试环境中使用过icehouse版本,记得当时查看网络列表是使用neutron net-list,最近两天在测试openstack ocata的时候发现好多之前的命令都不能正常使 ...

最新文章

  1. 解决Jetty Maven Plugin:Please initialize the log4j system properly(转)
  2. 设计模式 之 装饰者模式
  3. shell 拿到service状态_9个实战及面试会经常用到的Shell脚本!
  4. 数据处理的两个基本问题---汇编学习笔记
  5. Django知识总结(一)
  6. linux单网卡多拨Adsl,ROS单线多拨pppoe
  7. 数据结构算法入门--一文了解什么是复杂度
  8. Cannot resolve symbol 'R',Failed to resolve: constraint-layout
  9. (二)Luence——代码实现索引及搜索
  10. NOI 2017 整数(线段树)
  11. Excel如何实现随机不重复抽取
  12. BGP手动路由聚合(学习笔记+实验验证)
  13. JPA注解@Enumerated映射枚举字段
  14. 如何把用Word文档转换成PNG图片
  15. 如何锁定计算机硬盘,详细教您如何给硬盘加密
  16. Node.js 中 __dirname 和 ./ 的区别
  17. 软工大作业·历物语(二)
  18. gitflow概念及上传本地文件到github
  19. java 某个类 单独输出日志_log4j实现特定功能的日志单独输出到指定的日志文件...
  20. iot 开源平台thingsboard使用总结

热门文章

  1. Sonar安装与配置
  2. 学好设计模式的思维导图
  3. git入门 - 获取帮助
  4. Android投屏方案(基于cling)
  5. 【嵌入式】FS2410移植U-Boot-1.1.6
  6. Web学习 云道首页案例
  7. 乐思网络信息采集系统
  8. 金蝶智慧记 v2.0.8.5
  9. 【工具】5 个可以加速开发的 VueUse 库函数
  10. Java8 ForkJoinPool(一) 源码解析