# Rails 3 DEPRECATIONS

**URL:** <https://www.ruby-forum.com/t/rails-3-deprecations/186568>\
**Category:** Rails\
**Created:** [April 8, 2010, 11:57pm UTC](https://www.ruby-forum.com/t/rails-3-deprecations/186568 "2010-04-08T23:57:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevedogers](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9dc877/32.png) [@stevedogers](https://www.ruby-forum.com/u/stevedogers)\
**Post date:** [April 8, 2010, 11:57pm UTC](https://www.ruby-forum.com/t/rails-3-deprecations/186568/1 "2010-04-08T23:57:29Z")

</div>

Rails 3 DEPRECATIONS

I’m working my way through the transition from Rails 2 to Rails 3 and I  
came across the DEPRECATION warnings that we all will start seeing real  
soon. These are currently implemented as shortcuts to constants, but to  
bring your code up to date and eliminate deprecation concerns, they  
should all be converted.

The following are some of the most common (current way =\> new way):

RAILS\_ROOT =\> Rails.root  
RAILS\_ENV =\> Rails.env  
RAILS\_DEFAULT\_LOGGER =\> Rails.logger  
RAILS\_CACHE =\> Rails.cache

But what about the following?

RAILS\_CACHE\_ID  
RAILS\_ASSET\_ID  
RAILS\_GEMS  
RAILS\_FRAMEWO?RK\_ROOT  
RAILS DEFAULT\_DATABASE  
RAILS\_LOADED  
RAILS\_PKG\_DESTINATION  
RAILS\_RELATIVE\_URL\_ROOT  
RAILS\_CONNECTION\_ADAPTERS  
RAILS\_GEM\_VERSION  
RAILS\_NOISE

Others that are not so directly related include:

RAILTIES\_PATH  
MERB\_ENV  
ROUTE\_FILE  
DEFAULT\_BEHAVIORS

These constants were taken from Jamis B.'s “bucketwise” app that  
Jeremy McAnally uses as an example app in his well written Rails 3  
Upgrade Handbook.

Is the idea that all of these constants will eventually be transitioned  
from shortcuts to the Rails 3 way (attributes?) or is there some special  
case for the current crop that make them special?

TIA for all replies.

– Steve  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![stevedogers](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9dc877/32.png) [@stevedogers](https://www.ruby-forum.com/u/stevedogers)\
**Post date:** [April 9, 2010, 11:53am UTC](https://www.ruby-forum.com/t/rails-3-deprecations/186568/2 "2010-04-09T11:53:21Z")

</div>

On 9 April 2010 00:24, Steve D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> RAILS\_ROOT =\> Rails.root  
> RAILS DEFAULT\_DATABASE  
> MERB\_ENV
> 
> TIA for all replies.
> 
> – Steve  
> removed\_email\_address@domain.invalid

I think you should post this across to RubyOnRails - Core ML.

Anuj

> 

–  
Anuj DUTTA
