Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on Rails : Where i can get error log?

I am new in ruby on rails. When ever something is wrong I got this error:

Template is missing

Missing template errors/error_404 with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. 
Searched in: * "C:/Users/Avi/Documents/Aptana Studio 3 Workspace/social/app/views" * "C:/RubyonRails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/devise-2.2.4/app/views" 

But the problem is something syntax error or programming error.

Can I get a error log, something like in cakephp?

like image 875
AviSingh Rajput Avatar asked Jul 04 '13 06:07

AviSingh Rajput


People also ask

Where does Rails logger info write to?

By default it puts these log files in the log/ directory of your project. So if you open up that folder you'll see a development.

How do I create a log in Rails?

If you want to change all the default logging for that specific model, you can simply use User. logger = Logger. new(STDOUT) or wherever you want to log to. In the same way, ActiveRecord::Base.

How do I create a log file in Ruby?

Since the logger library comes with Ruby, there's no need to install any gems or other libraries. To begin using the logger library, simply require 'logger' and create a new Logger object. Any messages written to the Logger object will be written to the log file.


1 Answers

Open your rails application. You will find a directory named log. Open it then you will find a log file named development. It is the file where are the errors are logged.

like image 127
Chaithanya Krishna Avatar answered Oct 04 '22 19:10

Chaithanya Krishna