search for: brqzzmof2zxyvrtkodd74u8msao

Displaying 11 results from an estimated 11 matches for "brqzzmof2zxyvrtkodd74u8msao".

2007 Nov 15
4
Using .find_by_sql for database/admin queries
I want to create an internal admin view to display the output of "show variables" from mysql. What''s the best approach do this? For example, I''m doing something like this: @variables = ActiveRecord::Base.find_by_sql "show variables;" Then, I get stuff like this back (227 elements in @variables) in script/console: >> @variables[0] =>
2009 Sep 28
3
rjb: Java classes in Rails
Hi, For those who might not be aware, rjb is a killer gem for using java classes inside your rails app (or any ruby code). Check it out at: http://rubyforge.org/projects/rjb/ I was able to successfully use it in one of my apps that required some code that is only available in java. And it''s much nicer than having to compile a java app, then shell out using backticks, get back the return
2006 May 30
6
How to solve "Marshal Data Too Short" error?
Hi I''ve got the error in the log file "marshal data too short" after I try to store some data into session. After doing some research on the internet, it looks like the problem was caused by pstore.rb. It is there way to solve this problem? Thank you -- Posted via http://www.ruby-forum.com/.
2006 Apr 20
3
has_many :through with has_many/has_many join models
It seems that using a join model that joins with two has_many''s will fail to generate proper SQL class StudentSemesterRecord < ActiveRecord::Base belongs_to :semester has_many :discipline_records, :through => :semester end class Semester < ActiveRecord::Base has_many :student_semester_records has_many :discipline_records end class DisciplineRecord <
2006 May 23
8
ad-hoc query
How do you run an ad-hoc query that does not belong in any model? I thought it was something like ActiveRecord::connection.find("my query..."), but I can''t seem to find the documentation on it. I know I''ve seen it somewhere before, though. thanks, Jeff -- Posted via http://www.ruby-forum.com/.
2007 Jun 05
4
uninitialized constant RailsHandler::Dispatcher
Hello, I am running in to an error trying to run mongrel. The server starts but then trying to access any url in my application throws this error: calling Dispatcher.dispatch uninitialized constant RailsHandler::Dispatcher ./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:477:in `const_missing''
2007 May 21
7
How do I stop a column being updated by model.save?
One of my models has a column that is updated very frequently from a separate process, so it is important that when a record is saved in rails, this column should be left alone. In the update method of the controller I have: @record = MyModel.find(params[:id]) @record.update_attributes(params[:my_model]) params[:my_model] doesn''t have a reference to the column I''m talking
2005 Oct 19
35
Why you MUST use SCGI for Rails development
Hello happy Railers, I used to develop with a local out-of-the-box Apache and load times were pretty slow (like a few seconds each page). "Well, it''s the price to pay for no compile / cache / etc..." I thought. Nonsense. Yesterday I installed SCGI, and now I''ve got the best of both worlds: rails development env uses my very latest modifications, while SCGI ensures I
2009 Jan 13
9
Updating multiple databases at the same time
I have an application that is load balanced. I have a master database which I update once a day. Then I push the raw mysql files to all other servers so they are the same as the master. This works fine, but there are a few situations where I need all databases to update in real-time. What would be the best way to achieve this in rails? Here is an example of what I am trying to do. I want to
2005 Dec 29
0
observe_form without an update parameter
I''m using observe_form in a place that does not require any response from the server. So I do not use an update paramater. But without it webbrick hangs for a couple seconds and returns a status 500. On occasion, there will even be an exception in webbrick''s output if I change the form then quickly click a link before the couple second hang is done. If a add an update, it
2005 Jul 28
0
ActiveRecord, computed values, and associations
Is there some sort of good pattern for dealing with computed values with Rails/ActiveRecord? A simple example: 3 tables, classes, students, and student_class_records (habtm style relation but contains a good deal of additional state so is modeled explicitly) Something like select the 10 classes with the most students. Easy enough in SQL. So I''m using a lot of find_by_sql and