Displaying 20 results from an estimated 2000 matches similar to: "NameError (uninitialized constant UnknownAction)"
2006 Feb 07
1
AWDWR: NameError (uninitialized constant UnknownAction) in rescue_action_in_public
I copied (and modified) this code from AWDWR:
def rescue_action_in_public(exception)
case exception
when ActiveRecord::RecordNotFound,
ActionController::UnknownAction
render :template=>''/error'', :layout=>''application'',
:status=>''404 Not Found''
else
render :template=>''/error'',
2006 Mar 07
17
Handling Erros from AWDWR
I''m getting to the point now where I really need to start trapping the
errors.
So from my AWDWR book, I added the following directly from the book into
application.rb...
def rescue_action_in_public(exception)
case exception
when ActiveRecord::RecordNotFound, ActionController::UnknownAction
render(:file => "#{RAILS_ROOT}/public/404.html",
2006 Feb 16
3
rescue_action_in_public question
I''m using the rescue_action_in_public example from the Agile book to
handle errors and email serious ones to me. In my application.rb
controller:
def rescue_action_in_public(exception)
logger.error("rescue_action_in_public executed")
case exception
when ActiveRecord::RecordNotFound, ActionController::RoutingError,
ActionController::UnknownAction
2007 Sep 08
1
Unknown Action doesn't raise exception ?
As I am in development environment, I wrote in my config/environment.rb
ActionController::Base.consider_all_requests_local = false
in my application.rb, I wrote
def rescue_action_in_public(exception)
case exception
when RoutingError, UnknownAction
render :file => "#{RAILS_ROOT}/public/404.html", :status =>
404
else
logger.error
2007 Jan 20
1
Missing action error not being caught
I keep getting a blank page containing only the following:
"There was a controller specfic error processing your request."
Though I have the following in my application.rb
def rescue_action_in_public(exception)
case exception
when UnknownAction, ActiveRecord::RecordNotFound then
render :controller => "application", :action =>
2005 Dec 21
2
Missing error page templates
Whenever I get any errors on my application, I don''t get the regular
rails error page with all the debugging information. What could''ve
cause this? This is from the logs:
ActionView::ActionViewError (No rhtml, rxml, rjs or delegate template
found for /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/templates/rescues/template_error.rhtml):
2006 Jul 04
0
ActionController::UnknownAction hangs application
I''m trying to override rescue_action_in_public() using the PP example,
but my application hangs every time I generate an error.
def rescue_action_in_public(exception)
case exception.class
when ActiveRecord::RecordNotFound,
ActionController::UnknownAction
render( :file => "#{RAILS_ROOT}/public/404.html",
:status => "404 Not
2006 Feb 22
7
Ruby on Rails with Apache2, MS SQL on Windows XP
My app was running fine with Linux, Apache2/Lighttpd and MySQL. I have a
need to migrate to Windows, Apache2 and MS SQL. But I keep getting the
following error when I load the initial home page. Anyone can please
give me a pointer where to go next for troubleshooting? Thanks in
advance.
NameError in <controller not set>#<action not set>
uninitialized constant
2006 Jan 24
4
SMTPSyntaxError with Action Mailer
I''ve been trying to get my action mailer powered form to work all day. I
can get it to work perfectly in development mode.
But when I run it in production mode I get an error, the log spits this
out
Net::SMTPSyntaxError (501 Syntax: HELO hostname
):
/usr/lib/ruby/1.8/net/smtp.rb:680:in `check_response''
/usr/lib/ruby/1.8/net/smtp.rb:653:in `getok''
2006 Jan 04
3
Intermittent problem with link_to_remote()
Hi folks,
My page displays links for ''categories'' using the link_to_remote()
function. Clicking on one of these links goes to the controller and
returns any child categories. I''m finding that the page works ok but
after a number of clicks (average 5 or so), it crashes with an error:
==============================================
Processing Base#index (for
2006 Jan 28
3
App running fine on Webrick, ActiveRecord::ConnectionNotEstablished in lighttpd
My app runs fine on webrick, but I get a
ActiveRecord::ConnectionNotEstablished when I try to run it on
lighttpd. Here''s the app''s lighttpd config:
$HTTP["host"] =~ "(www\.)?mysite\.com" {
server.document-root = "/home/pergesuteore/public/"
server.error-handler-404 = "/dispatch.fcgi"
fastcgi.server = ( ".fcgi" =>
(
2006 Jan 24
14
A bad day with Action Mailer
Hi, I''ve setup Action Mailer today to email the contents of a form.
Every seemes fine except when the email is sending.
Here is the error I get on the production server:
SocketError (getaddrinfo: Name or service not known):
/usr/lib/ruby/1.8/net/protocol.rb:83:in `initialize''
/usr/lib/ruby/1.8/net/protocol.rb:83:in `new''
2006 Feb 08
5
Mysql::Error: Lost connection to MySQL server during query:
Hi,
I am having Mysql connection problem for my first AddressBook
application (which I took it from
http://www-128.ibm.com/developerworks/linux/library/l-rubyrails/)
I have gem installed the latest ruby, rails, lighttpd, fastcgi,
mysql-4.1.14 on linux. Everything looks good. When I do:
mysql -h localhost -u test -ptest -D AddressBook
mysql> SELECT COUNT(*) FROM contacts;
+----------+
|
2006 Aug 05
1
"uninitialized constant" error when I go to app base URL???
Hi,
I''m getting the below attached error when I navigate to the root of my
web application on my hosting site (dreamhost.com), however in
development it works fine. Any ideas?
That is I have one controller so the direct URL is
"http://mydomain.com/contacts". This works on dreamhost and locally.
BUT when I go to "http://mydomain.com/" this works locally (on
2006 Sep 01
0
Why prefix ActionController::UnknownAction with ::?
In my application.rb''s rescue_action_in_public, why do I need to prefix
ActionController::UnknownAction with ::, when
ActiveRecord::RecordNotFound (no :: prefix) works? If I don''t prefix the
former, I get an unknown constant (or similar) error.
Joe
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message
2006 Jul 31
0
rescue_action_in_public useless to capture low level errors
Hi all,
I''m trying to make for nicer system error handling, with the help of
rescue_action_in_public
(see Recipe 47, in ''Rails Recipes'')
PROBLEM:
While it lets me capture an incorrect db name in database.yml (for
example),
with lower level errors like when the DB server is just down, I still
get the default system error screen for MySQL::ERROR :
2006 May 28
0
How to fix NameError?
Hi,
I get the following error in production:
Processing Base#index (for 68.146.229.246 at 2006-05-28 14:49:59) [GET]
Parameters: {}
NameError (uninitialized constant FrontControllerController):
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:195:in
`const_missing''
2006 Jun 30
1
Taking Control of Un-handled Exceptions
Greetings,
I''m trying to catch all un-handled exceptions. I''m having problems
handling the RoutingError and UnknownAction exceptions.
I''ve added the following to my application controller as a protected
method:
def rescue_action(exception)
render(:text => "error")
end
As far as I understand, this should catch all uncaught exceptions and
override
2008 May 11
2
UnKnownAction exception
Hi all,
i''m new in ruby on rails.
i created a controller which has 2 views index, add_to_cart
& inside index i created "button_to" which references to add_to_cart
view, but when i click on this button UnKnownAction exception appear
to me, i don''t know why this happen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2007 Mar 01
0
FastCGI and Apache. Anybody know what can cause this error?
Does anybody know what could possibly be causing my error?
Somehow action_controller got into a state where it was retuning not
found for about 4 out of every 5 requests, seemingly arbitrarily.
Has anybody else ever experienced this? I''ve heard that apache and
fastcgi is not the best solution, do you think this is fcgi''s fault?
Could it be a bug in my ruby code? Could it be a