Im new to Ruby On Rails.Im using Ruby version 1.8.7 and Rails version 2.3.8.I created a controller SayHello using
ruby script/generate controller SayHello
The application works as expected, but i cant find the application.rb file. Where is the application.rb file located ?
Please Help Thank You
In the environment. rb file you configure these run-levels. For example, you could use it to have some special settings for your development stage, which are usefull for debugging. The purpose of this file is to configure things for the whole application like encoding.
Because RB files are XML files, you can open and edit them in any text editor, including: Microsoft Notepad (Windows) Apple TextEdit (Mac)
Rails is a web application development framework written in the Ruby programming language. It is designed to make programming web applications easier by making assumptions about what every developer needs to get started. It allows you to write less code while accomplishing more than many other languages and frameworks.
require can also be used to load only a part of a gem, like an extension to it. Then it is of course required where the configuration is. You might be concerned if you work in a multi-threaded environment, as they are some problems with that. You must then ensure everything is loaded before having your threads running.
I assume you're looking for the application controller which was named application.rb prior to rails 2.3 but is since application_controller.rb.
http://guides.rubyonrails.org/2_3_release_notes.html#application-controller-renamed
controllers>application_controller.rb
This file is new to rails 3, in rails 2 most of the things now in application.rb are in the environment.rb.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With