# Help needed in rails project

**URL:** <https://www.ruby-forum.com/t/help-needed-in-rails-project/159871>\
**Category:** Rails\
**Created:** [February 9, 2009, 4:20pm UTC](https://www.ruby-forum.com/t/help-needed-in-rails-project/159871 "2009-02-09T16:20:57Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![manisha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6f9a4e/32.png) [@manisha](https://www.ruby-forum.com/u/manisha)\
**Post date:** [February 9, 2009, 4:20pm UTC](https://www.ruby-forum.com/t/help-needed-in-rails-project/159871/1 "2009-02-09T16:20:57Z")

</div>

Hi friends,

I need to create some additional ruby files for some other functions  
inside a rails project. So I created another folder and put those files  
inside it.In this case one file needs to call the classes in other  
files, so I used  
require ‘filename’

My files run well when I put them in a Ruby project. But the same codes  
do not work when I put them inside a folder in a Rails Project.  
The problem is with “require” keyword.Error is

`require’: no such file to load --filename (LoadError)

I cannot understand why this happens.Can anyone provide some help in  
this regards? I will be really thankful.

---

<div class="post-metadata">

**Author:** ![manisha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6f9a4e/32.png) [@manisha](https://www.ruby-forum.com/u/manisha)\
**Post date:** [February 9, 2009, 4:24pm UTC](https://www.ruby-forum.com/t/help-needed-in-rails-project/159871/2 "2009-02-09T16:24:15Z")

</div>

See this line in your config/environment.rb

# Add additional load paths for your own custom dirs

# config.load\_paths += %W( #{RAILS\_ROOT}/extras )

Manisha T. escribiÃ³:

---

<div class="post-metadata">

**Author:** ![manisha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6f9a4e/32.png) [@manisha](https://www.ruby-forum.com/u/manisha)\
**Post date:** [February 9, 2009, 4:33pm UTC](https://www.ruby-forum.com/t/help-needed-in-rails-project/159871/3 "2009-02-09T16:33:21Z")

</div>

yes, do I need to uncomment it?

Juan JosÃ© Vidal wrote:

> See this line in your config/environment.rb
> 
> # Add additional load paths for your own custom dirs
> 
> # config.load\_paths += %W( #{RAILS\_ROOT}/extras )
> 
> Manisha T. escribiÃ³:

---

<div class="post-metadata">

**Author:** ![manisha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6f9a4e/32.png) [@manisha](https://www.ruby-forum.com/u/manisha)\
**Post date:** [February 9, 2009, 4:47pm UTC](https://www.ruby-forum.com/t/help-needed-in-rails-project/159871/4 "2009-02-09T16:47:19Z")

</div>

still its not working. :((

Juan JosÃ© Vidal wrote:

> Obviously.
> 
> Manisha T. escribiÃ³:

---

<div class="post-metadata">

**Author:** ![manisha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6f9a4e/32.png) [@manisha](https://www.ruby-forum.com/u/manisha)\
**Post date:** [February 9, 2009, 4:36pm UTC](https://www.ruby-forum.com/t/help-needed-in-rails-project/159871/5 "2009-02-09T16:36:38Z")

</div>

Obviously.

Manisha T. escribiÃ³:

---

<div class="post-metadata">

**Author:** ![manisha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6f9a4e/32.png) [@manisha](https://www.ruby-forum.com/u/manisha)\
**Post date:** [February 9, 2009, 4:48pm UTC](https://www.ruby-forum.com/t/help-needed-in-rails-project/159871/6 "2009-02-09T16:48:58Z")

</div>

You must put your path in this line…

Manisha T. escribiÃ³:

---

<div class="post-metadata">

**Author:** ![manisha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6f9a4e/32.png) [@manisha](https://www.ruby-forum.com/u/manisha)\
**Post date:** [February 9, 2009, 4:53pm UTC](https://www.ruby-forum.com/t/help-needed-in-rails-project/159871/7 "2009-02-09T16:53:40Z")

</div>

ok I am trying again

Juan JosÃ© Vidal wrote:

> You must put your path in this line…
> 
> Manisha T. escribiÃ³:

---

<div class="post-metadata">

**Author:** ![manisha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6f9a4e/32.png) [@manisha](https://www.ruby-forum.com/u/manisha)\
**Post date:** [February 9, 2009, 5:02pm UTC](https://www.ruby-forum.com/t/help-needed-in-rails-project/159871/8 "2009-02-09T17:02:52Z")

</div>

No its not working yet, can you please give an example how this line  
should be?  
Dont mind, I am not very competent, just learning . ☹  
so may be missing something

Manisha T. wrote:

> ok I am trying again
> 
> Juan JosÃ© Vidal wrote:
> 
> > You must put your path in this line…
> > 
> > Manisha T. escribiÃ³:

---

<div class="post-metadata">

**Author:** ![manisha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6f9a4e/32.png) [@manisha](https://www.ruby-forum.com/u/manisha)\
**Post date:** [February 9, 2009, 5:10pm UTC](https://www.ruby-forum.com/t/help-needed-in-rails-project/159871/9 "2009-02-09T17:10:50Z")

</div>

You can see some examples in:

[http://www.strictlyuntyped.com/2008/06/rails-where-to-put-other-files.html](http://www.strictlyuntyped.com/2008/06/rails-where-to-put-other-files.html)  
[http://www.depixelate.com/2007/12/13/actionwebservice-with-rails-2-0](http://www.depixelate.com/2007/12/13/actionwebservice-with-rails-2-0)  
[http://railsguts.com/initialization.html](http://railsguts.com/initialization.html)  
[http://www.benjaminbooth.com/tableorbooth/2006/11/rails\_and\_load\_.html](http://www.benjaminbooth.com/tableorbooth/2006/11/rails_and_load_.html)

Manisha T. escribiÃ³:

---

<div class="post-metadata">

**Author:** ![manisha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6f9a4e/32.png) [@manisha](https://www.ruby-forum.com/u/manisha)\
**Post date:** [February 9, 2009, 5:25pm UTC](https://www.ruby-forum.com/t/help-needed-in-rails-project/159871/10 "2009-02-09T17:25:17Z")

</div>

thanks a lot , it works now 🙂  
I just needed to add the folder name also in the require ‘’ line  
thaks a lot for the help

Juan JosÃ© Vidal wrote:

> You can see some examples in:
> 
> [http://www.strictlyuntyped.com/2008/06/rails-where-to-put-other-files.html](http://www.strictlyuntyped.com/2008/06/rails-where-to-put-other-files.html)  
> [http://www.depixelate.com/2007/12/13/actionwebservice-with-rails-2-0](http://www.depixelate.com/2007/12/13/actionwebservice-with-rails-2-0)  
> [http://railsguts.com/initialization.html](http://railsguts.com/initialization.html)  
> [http://www.benjaminbooth.com/tableorbooth/2006/11/rails\_and\_load\_.html](http://www.benjaminbooth.com/tableorbooth/2006/11/rails_and_load_.html)
> 
> Manisha T. escribiÃ³:
