On Tue, Jan 5, 2010 at 11:14 AM, Benjamin Podszun < [email protected]> wrote:
> On Tue, Jan 5, 2010 at 10:51 AM, Marius Mårnes Mathiesen > > environment.rb is the file normally included/required in order to load > the > > Rails environment; boot.rb is loaded from this. > > The other way around, no? > Actually, no - Rails takes care of loading the files for you provided you load environment.rb If you open an IRB session and "require config/environment" everything needed is loaded, which is not the case if you "require config/boot": <RAILS_ROOT> irb irb(main):001:0> require "config/boot" => true irb(main):002:0> User NameError: uninitialized constant User from (irb):2 from /usr/local/bin/irb:12:in `<main>' <RAILS_ROOT> irb irb(main):001:0> require "config/environment" => true irb(main):002:0> User => User(id: integer, login: string, email: string, crypted_password: string, salt: string, created_at: datetime, updated_at: datetime, remember_token: string, remember_token_expires_at: datetime, activation_code: string, activated_at: datetime, ssh_key_id: integer, fullname: string, url: text, identity_url: text, is_admin: boolean, suspended_at: datetime, aasm_state: string, public_email: boolean, wants_email_notifications: boolean, password_key: string, avatar_file_name: string, avatar_content_type: string, avatar_file_size: integer, avatar_updated_at: datetime) In my understanding, including environment.rb should be enough to get a working Rails environment. Side note: The poller script is basically part of the activemessaging Rails plugin (http://code.google.com/p/activemessaging/), with only slight modifications for Gitorious. - Marius -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected]
