Tagged Questions
0
votes
3answers
41 views
How to Handle Nil Errors in Rails?
What is the correct way to deal with nil errors in Rails? I often get errors like:
NoMethodError (undefined method `questions' for nil:NilClass):
For example, let's say I have chapters in my ...
0
votes
1answer
43 views
Rescue all errors of a specific type inside a module
I have a module in which I am performing all of my encryption/decryption tasks for a project. I would like to catch any OpenSSL::Cipher::CipherError exceptions that occur in this module so that I can ...
1
vote
2answers
75 views
Begin and Rescue block exception handling
I have little experience in rails exception handling. I have this snippet
def update
@game = Game.find(params[:id])
begin
params[:game][:tier] = eval(params[:game][:tier])
rescue
...
0
votes
1answer
163 views
Where and how to handle Stripe exceptions?
I'm building a small proof of concept with Stripe and Ruby on Rails 3.2. So far I've watched the Railscast on how to implement Stripe in a RoR app and it's working really well.
I've built my app by ...
0
votes
1answer
279 views
Mysql2::Error: Duplicate entry for key — ActiveRecord::RecordNotUnique not catching error?
I am working on a rails app and have been getting the following error very often:
Mysql2::Error: Duplicate entry '3022093-2000000028003-visited' for key 'unique_user_place_relationship'
While I've ...
0
votes
1answer
104 views
rails convention for http raising errors in controllers?
lets say I have an articles_controller with a show method
I want to make sure that only clients with a valid license code can read the json endpoint for this controller action
def show
...
1
vote
0answers
73 views
Filter Password in Request + Exception Logger
I'm using Exception logger to get the exceptions, save in DB and display it.
While displaying in the Exceptions page, the password that the user has entered is visible in the request parameters. Any ...
0
votes
1answer
88 views
Render failing to render correct template in rescue_from ActiveRecord::Rollback method
I'm building the checkout page for an e-commerce site, and I have a fairly long transaction that creates a new User model and a new Order model. I wrapped the creation of these models in a transaction ...
0
votes
1answer
153 views
MissingTemplate exception raised in mailer using delayed job
I use delayed job to carry out background tasks in my app. It does some stuff and then sends a mail. This is an example of the code block preformed as a delayed job.
def task
# do stuff
...
3
votes
3answers
83 views
Is there a Rails library that can track unique errors?
Is there anything for Rails that is similar to Sentry for Django?
The main functionality I'm after is automatic deduping exceptions so emails aren't repeated for the same error.
Here is a screenshot ...
1
vote
2answers
218 views
Exception Handling: “undefined method `____' for nil:NilClass”
One of the most common reasons my web application fails is because a user sometimes lacks a certain attribute that a view expects it to have. For instance, most users in my application have an ...
0
votes
1answer
166 views
Rails exception notifier — add to database
We have exception notifier set up on our server, though would like a back-up solution, if the email server is down, that would let us log exceptions in the database.
How is exception notifier ...
1
vote
1answer
168 views
How do I show a 500 error stack trace to admins only on production in Rails?
I want it so that ordinary users see the normal "We're sorry, but something went wrong." message when they hit a 500 error but admins see the development style full stack trace on production.
We are ...
3
votes
1answer
139 views
exception-notification gem “ERROR: Failed to generate exception summary”
Been using the exception-notification gem for some time now rather successfully, however I have been annoyed by an entry in the emails at the top of each email body just after the actual error. The ...
0
votes
1answer
96 views
Exception ActiveRecord::StatementInvalid doesn't works
I'm relative new to Rails, so I don't know if my way to solve the problem is the correct, but there's some problem with it
I have installed in my PC MySQL, but Heroku uses PostgreSQL, so I'm ...