How do I properly arrange my Gemfile for Rails 3?
I am trying to install vo开发者_如何转开发te-fu into my rails 3 project.
The documentation ( for rails 2 ) says to install it into my environments.rb file as so..
config.gem "peteonrails-vote_fu", :lib => 'vote_fu', :source => 'http://gems.github.com'
How could I convert that to rails 3 for the Gemfile?
In Gemfile:
gem 'vote_fu'
http://gems.github.com is no more. The standard gem host is http://gemcutter.org which Bundler is setup to use by default, so you don't need to specify source. Vote_fu is hosted on gemcutter (see: http://rubygems.org/gems/vote_fu).
For reference, you would convert the options in config.gem like this:
:source => 'example.com' changes to (on its own line in Gemfile):
source 'example.com'
:lib => 'mylib' changes to:
gem 'libkey_mylib', :require => 'mylib'
精彩评论