How to organize my Gemfile for Rails 3?

I am trying to set a vote in a rails 3 project.

The documentation (for rails 2) says that you need to install it in the environment.rb file like this.

config.gem "peteonrails-vote_fu", :lib => 'vote_fu', :source => 'http://gems.github.com'

How could I convert this to rails 3 for gemfile?

+3
source share
1 answer

In the gemfile:

gem 'vote_fu'

http://gems.github.com no longer exists. The standard gem host is http://gemcutter.org , which the Bundler is configured to use by default, so you don't need to specify a source. Vote_fu is hosted on gemcutter (see: http://rubygems.org/gems/vote_fu ).

For reference, you should convert the parameters to config.gem as follows:

: source = > 'example.com' ( Gemfile):

source 'example.com'

: lib = > 'mylib' :

gem 'libkey_mylib', :require => 'mylib'
+8

Source: https://habr.com/ru/post/1756843/


All Articles