# Problem loading YAML files and using pluralize method in Rails3rc

**URL:** <https://www.ruby-forum.com/t/problem-loading-yaml-files-and-using-pluralize-method-in-rails3rc/192324>\
**Category:** Rails\
**Created:** [July 28, 2010, 7:47am UTC](https://www.ruby-forum.com/t/problem-loading-yaml-files-and-using-pluralize-method-in-rails3rc/192324 "2010-07-28T07:47:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elioncho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ed8c4c/32.png) [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Post date:** [July 28, 2010, 7:47am UTC](https://www.ruby-forum.com/t/problem-loading-yaml-files-and-using-pluralize-method-in-rails3rc/192324/1 "2010-07-28T07:47:15Z")

</div>

Hi,

I just upgraded my rails app from rails3.0.0beta4 to rails3.0.0rc and  
I’m having problems loading a yaml file. I have a load\_config.rb in  
the initializers folder which loads a yaml file. The basic loading  
code is:

FACEBOOK\_CONFIG = YAML.load\_file(File.join(Rails.root, ‘config’,  
‘facebooker.yml’))[RAILS\_ENV]

This stopped working when I moved to rails3rc. FACEBOOK\_CONFIG returns  
nil.

Also, I have a pluralize method in one of my views, which worked right  
before:

\<%= pluralize(post.comments.size, ‘comment’) %\>

Now, I’m getting a:

uninitialized constant Post::Comment

Can anyone help me sort these two problems?

---

<div class="post-metadata">

**Author:** ![elioncho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ed8c4c/32.png) [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Post date:** [July 28, 2010, 7:53am UTC](https://www.ruby-forum.com/t/problem-loading-yaml-files-and-using-pluralize-method-in-rails3rc/192324/2 "2010-07-28T07:53:06Z")

</div>

I figured out the solution for the YAML problem. RAILS\_ENV has changed  
to Rails.env. I changed it and it work. I still have problems with the  
pluralize method though.

Any help is appreciated
