我被告知要使用 rails-i18n gem 的 v0.6.5,所以我首先检查我是否已经是最新的,而我不是(v0.6.0)。所以我尝试gem update rails-i18n
了(这似乎不是更新特定 gem 的正确命令,但它似乎更新了所有已安装的 gem,对吗?),这似乎没有更新任何东西(“没有更新”)。
所以我gem 'rails-i18n', '>= 0.6.5'
在我的 Gemfile 中指定,然后运行bundle
. 这似乎也没有安装任何新的东西(没有花费近一秒钟的时间来完成,并且控制台输出中只有“Using ...”语句),但经过另一次检查,v0.6.5 已安装!
我现在有点困惑,这个版本是从哪里来的?它是否已经安装在我的系统上?那为什么我第一次检查 using 时它没有出现gem list | grep i18n
?
查看我的输出以验证我的陈述。
macbuech:iq josh$ gem list | grep i18n
i18n (0.6.0)
rails-i18n (0.6.5)
macbuech:iq josh$ gem update rails-i18n
Updating installed gems
Nothing to update
macbuech:iq josh$ bundle
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.3.6)
Using activesupport (3.2.1)
Using builder (3.0.0)
Using activemodel (3.2.1)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.1)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.4)
Using actionmailer (3.2.1)
Using arel (3.0.2)
Using tzinfo (0.3.33)
Using activerecord (3.2.1)
Using activeresource (3.2.1)
Using addressable (2.2.8)
Using ancestry (1.3.0)
Using bcrypt-ruby (3.0.1)
Using bson (1.5.2)
Using bson_ext (1.5.2)
Using bundler (1.1.4)
Using highline (1.6.12)
Using net-ssh (2.5.2)
Using net-scp (1.0.4)
Using net-sftp (2.0.5)
Using net-ssh-gateway (1.1.0)
Using capistrano (2.12.0)
Using nokogiri (1.5.5)
Using ffi (1.0.11)
Using childprocess (0.3.2)
Using libwebsocket (0.1.3)
Using rubyzip (0.9.9)
Using selenium-webdriver (2.24.0)
Using xpath (0.1.4)
Using capybara (1.1.2)
Using capybara-firebug (1.1.0)
Using json (1.7.3)
Using capybara-webkit (0.12.1)
Using carrierwave (0.6.2)
Using mongo (1.5.2)
Using mongoid (2.4.11)
Using carrierwave-mongoid (0.2.1)
Using chronic (0.6.7)
Using chunky_png (1.2.5)
Using cleditor_rails (0.0.3)
Using coderay (1.0.7)
Using coffee-script-source (1.3.3)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using rdoc (3.12)
Using thor (0.14.6)
Using railties (3.2.1)
Using coffee-rails (3.2.2)
Using columnize (0.3.6)
Using fssm (0.2.9)
Using sass (3.1.19)
Using compass (0.12.2)
Using compass-rails (1.0.2)
Using coolline (0.2.0)
Using diff-lcs (1.1.3)
Using gherkin (2.11.1)
Using cucumber (1.2.1)
Using cucumber-rails (1.3.0)
Using daemons (1.1.8)
Using database_cleaner (0.8.0)
Using debugger-ruby_core_source (1.1.3)
Using debugger-linecache (1.1.2)
Using debugger (1.1.4)
Using delayed_job (3.0.3)
Using delayed_job_active_record (0.3.2)
Using orm_adapter (0.3.0)
Using warden (1.2.1)
Using devise (2.1.2)
Using eventmachine (0.12.10)
Using em-websocket (0.3.6)
Using rspec-core (2.10.1)
Using rspec-expectations (2.10.0)
Using rspec-mocks (2.10.1)
Using rspec (2.10.0)
Using email_spec (1.2.1)
Using factory_girl (3.5.0)
Using factory_girl_rails (3.5.0)
Using formtastic (2.2.1)
Using god (0.12.1)
Using rb-fchange (0.0.5)
Using rb-fsevent (0.9.1)
Using rb-inotify (0.8.8)
Using listen (0.4.7)
Using guard (1.1.1)
Using guard-bundler (1.0.0)
Using guard-cucumber (1.2.0)
Using guard-livereload (1.0.0)
Using guard-migrate (0.1.1)
Using guard-rails (0.1.0)
Using guard-rspec (1.1.0)
Using spork (0.9.2)
Using guard-spork (1.1.0)
Using haml (3.1.6)
Using haml-rails (0.3.4)
Using hpricot (0.8.6)
Using jquery-rails (2.0.2)
Using jquery-ui-rails (1.0.0)
Using kaminari (0.13.0)
Using launchy (2.1.0)
Using linecache19 (0.5.13) from source at ~/.rvm/gems/ruby-1.9.3-p0/gems/linecache19-0.5.13/
Using method_source (0.7.1)
Using mysql2 (0.3.11)
Using prickle (0.0.6)
Using slop (2.4.4)
Using pry (0.9.9.6)
Using pry-debugger (0.2.0)
Using yard (0.8.2.1)
Using pry-doc (0.4.2)
Using pry-rails (0.1.6)
Using rack-livereload (0.3.6)
Using rails (3.2.1)
Using rails-i18n (0.6.5)
Using rails3-jquery-autocomplete (1.0.7)
Using remarkable (4.0.0.alpha4)
Using remarkable_activemodel (4.0.0.alpha4)
Using remarkable_activerecord (4.0.0.alpha4)
Using rspec-rails (2.10.1)
Using ruby-debug-base19 (0.11.26) from source at ~/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-base19-0.11.26/
Using ruby-debug19 (0.11.6)
Using ruby_gntp (0.3.4)
Using sexp_processor (3.2.0)
Using ruby_parser (2.3.1)
Using sass-rails (3.2.5)
Using shoulda-matchers (1.2.0)
Using simplecov-html (0.5.3)
Using simplecov (0.6.4)
Using syntax (1.0.0)
Using uglifier (1.2.5)
Using vpim (0.695)
Using whenever (0.7.3)
Using yajl-ruby (1.1.0)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
macbuech:iq josh$ gem list | grep i18n
i18n (0.6.0)
rails-i18n (0.6.5)
macbuech:iq josh$
非常感谢您的澄清。