views:

67

answers:

2

I find that the the config/environment.rb file looks different in Rails version 3.0.
Also when i add the line "config.gem "authlogic".To environment.rb file

+2  A: 

For Rails 3, you no longer edit config/environment.rb. You edit Gemfile, adding

gem 'authlogic'

to it, and then do a

bundle install

more info: http://gembundler.com/rails3.html


There will be a Gemfile.lock, and it lists all the gems and their versions in your project. Bundler's docs:

Whenever your Gemfile.lock changes, always check it in to version control. It keeps a history of the exact versions of all third-party code that you used to successfully run your application.

When your co-developers (or you on another machine) check out your code, it will come with the exact versions of all the third-party code your application used on the machine that you last developed on (in the Gemfile.lock). When they run bundle install, bundler will find the Gemfile.lock and skip the dependency resolution step. Instead, it will install all of the same gems that you used on the original machine.

動靜能量
+1  A: 

Pretty basic step by step tutorial here: http://www.logansbailey.com/2010/10/06/how-to-setup-authlogic-in-rails-3/

Logan Bailey