Working on OS X, trying to get Rails Exception Notifier plugin to send out emails. I have verified the following:
I can successfully send email from my app
I am creating a test error (1/0 in one of my actions).
Current plugin installed...
script/plugin install git://github.com/rails/exception_notification.git
In ApplicationController....
when I send an object through an HTTPService to an XML api run by a Rest ruby on rails server.. how does it get converted to XML? I mean, it just works fine for strings and numbers, but for example Date type conversion causes an "unprocessable entity" error on rails log..
Any Idea?
...
When I use "spec xxx.rb" to test certain ruby code, I got this error:
Missing these required gems:
webrat ~> 0.4.4
You're running:
ruby 1.8.7.174 at /usr/local/bin/ruby
rubygems 1.3.5 at /root/.gem/ruby/1.8, /usr/local/lib/ruby/gems/1.8
Run `rake gems:install` to install the missing gems.
And I have webrat 0.5.3 gem running a...
I have the folowing migration but don't know what to use in the down method
change_table :addresses do |t|
t.references :addressable, :polymorphic => true
end
...
Forgive the newbie type question but, what determines the RAM consumed by rails and MySQL (my server is Ubuntu)? With barely any requests coming in the server seems to be hovering around 1.5 of 2GB. MySQL has about 100MB of data stored in it. The site has about 3500 registered users and when trafic is high, the memory tends to peak aro...
I'm trying to use Authlogic to protect some in place editor fields I have on a page. I've protected all the methods in my controller, but it looks like in_place_editor is calling some weird generated stuff that doesn't even show up in my routes, like "/quotes/set_quote_text/1". Number one is there a site that tells more about these "secr...
I'm using Rails and MySQL, and have an efficiency question based on row counting.
I have a Project model that has_many :donations.
I want to count the number of unique donors for a project.
Is having a field in the projects table called num_donors, and incrementing it when a new donor is created a good idea?
Or is something like @num...
Hello.
I have a model in Rails, User. Everytime I refer to him (for example, find_by_name("NAME") in script/console), its field/attribute last_login changes to the current time.
Here's my model:
class User < ActiveRecord::Base
# ACCOUNT INFORATION VALIDATION
validates_presence_of :name
validates_uniqueness_of :name
va...
I'm revising this question again because I solved a majority of the issues. The current bug that I could use some help with is that when I remove an object using the technique described below, I end up with orphaned database rows that should be getting deleted. Details below.
I'm using the Ryan Bates technique from Advanced Rails reci...
Here I want to show the extra attribute CONFIRMED from the employments join table. What am I doing wrong?
class Job < ActiveRecord::Base
has_many :employments, :dependent => :destroy
has_many :users, :through => :employments
class User < ActiveRecord::Base
has_many :employments
has_many :jobs, :through => :employments
class Empl...
Hi,
We are working on an online food ordering application. When the user orders something from any restaurant, an email is sent to the restaurant's email address mentioning the order details. However, our client wants that an order print out should be generated automatically as soon as a new order is received.
Is it feasible using ROR?...
I am trying to stage an app on Heroku that uses the Authlogic plugin. The Logs show me this error. I first thought there is a problem with the gem version, but I tried several: 2.1.1, 2.1.2, 2.1.3.
But I tried deploying the authlogic example but it throws the same error.
Thank you for your time.
Processing UserSessionsController#new (...
I was wondering, is it possible to synchronize with any tool or gem or w/e 2 or more yml files?
eg. i have the Greek yml file called el.yml
el:
layout:
home: "Αρχική"
and the english one called en.yml
en:
layout:
home: "Home"
category: "Category"
Is there any tool that based on a single yml file ie en.yml ( root ) ...
I am aware of ActiveRecord::Dirty and the related methods, but I don't see a means by which I can subscribe to an attribute changed event. Something like:
class Person < ActiveRecord::Base
def attribute_changed(attribute_name, old_value, new_value)
end
#or
attribute_changed do |attribute_name, old_value, new_value|
end
end
...
I'm using Capistrano and have everything configured. The weird issue I have is that before, I got a nice Passenger error saying what was wrong (I hadn't fully uploaded my vendor/rails directory). After I do that, however, I'm now getting the general Rails We're sorry, but something went wrong 500 error instead of the Passenger error pa...
I'm getting a similar error to this post http://stackoverflow.com/questions/1475128/ruby-on-rails-authlogic-password-not-valid "Password is not valid" which never seemed to be resolved
in the script/console if I create a new user:
myval = "[email protected]"
u = User.create(:email => myval, :password => myval, :password_confirmation => m...
I have a Members ActiveRecord model and I want to create a method that would fetch members from an external source and synchronize them with the members in the database already.
I don't know where I should put that method that would be called. It seems like I shouldn't put it in the controller since it is a lot of logic, but I don't kno...
If a user has cookies disabled in their browser can restful authentication and role requirement still work?
On our site, with cookies disabled, the system won't let you log in. Any way to fix this?
Thanks in advance.
...
I've got an app developed on Ruby 1.8.6 and frozen to use Rails 2.0.2 that hits problem after problem on Snow Leopard:
-Default Snow Leopard Ruby 1.8.7 64-bit and 32-bit running Rails 2.0.2
-rake tasks not seeing ZenTest
-openssl header mismatches while compiling 32-bit Ruby 1.8.6 from source
-image_science apparently requiring Xcode De...
Let's say I have a Course in which Students can enroll via a Membership (e.g. a has_and_belongs_to_many relationsip of Courses and Students). Some memberships are for students who are just observing the class (not for credit, etc.), so:
class Course < ActiveRecord::Base
has_many :memberships
has_many :students,
:through...