What is the purpose of require_relative in ruby?



What is the purpose of require_relative in ruby?..

Answer / Pawan Kumar Paswan

require_relative is used to load a Ruby file that is located relative to the current file. Unlike require, it will only load the specified file once, regardless of how many times it's called.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby on Rails Interview Questions

Am Fresher ..,i dont know seven controller methods.am searching in google .but am not getting .help me

1 Answers   Baidu,


What do you mean by render and redirect_to?

1 Answers  


What are the steps involved in writing and setting up an application in ruby on rails?

1 Answers  


Mention the differences between the observers and callbacks in ruby on rails.

1 Answers  


am new to ruby. tell me one thing. i can view my project on browser when i write "ruby script/server". otherwise i cant view my project on localhost. what i have to do to view my project always on browser? pls help

5 Answers  


What are the various components of rail?

1 Answers  


Explain testing in rails.

1 Answers  


what is active record?

1 Answers  


what is Ruby on Rails?

1 Answers  


Is it possible to build a 50% bespoke e-commerce platform hence having the ability to customize everything down the line? For example would it make sense to start coding an application on the Ruby on Rails framework but where the most complex/time consuming code pieces (e.g. shopping cart, etc) can be initially bolted on (hence diminishing development time and cost) having the ability to change them completely further down the line?

1 Answers  


How can you run rails without creating databases?

1 Answers  


How are blocks created?

1 Answers  


Categories