Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

rails console loads "production" env with "t" argument

#5527

The console command regards the environment argument as the following:

% rails console t
Loading production environment (Rails 3.0.0)
>> Rails.env
=> "production"
% rails console d
Loading production environment (Rails 3.0.0)
>> Rails.env
=> "production"

This behavior is caused by this logic:

%w(production development test).find { |e| e.index(env) }
because both 't' and 'd' are included in 'production'.

I guess this is not intentional, so attached a patch to forward match the argument.

Reported by Akira Matsuda · September 2nd, 2010 @ 04:32 AM

State: resolved
Milestone: 3.x
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. Neeraj Singh
    Neeraj Singh
    • Milestone set to 3.x
    • State changed from new to open
    • Assigned user set to José Valim
    • Importance changed from to Low

    +1 looks good to me. Did not test the actual code though.

    September 2nd, 2010 @ 05:54 AM

  2. Repository