Displaying 20 results from an estimated 5000 matches similar to: "inexpensive ways to make a rails application highly available? mysql replication?"
2005 Dec 20
7
wrong id for activerecord object when using :joins in mysql
I''m using a find with a :joins clause, like this:
:joins => "JOIN table_b ON table_b.id=table_b_id"
The records returned are used in a scaffold generated list page. The edit,
show, and destroy links are getting the wrong id. They are getting the id of
the table b record.
When I run the query using mysql, I see that the query returns *2* id
columns, the id of the main
2006 Feb 07
17
Easy way of dealing with nil properties in templates?
Is there an easy way to deal with nil properties in
templates? All I''m aware of are these methods, and
it''s quite tedious and surely violates DRY.
<%= @member.name unless @member.name.nil? %>
<%= @member.name.to_is %>
<%= "#{@member.name}" %>
csn
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the
2006 Jul 13
6
Webservices Xml-Rpc and authentication
Hello,
I want to build an application where i have client and server. I need to exacute
commands with XM-RPC. I can get all this working, following the howto''s in wiki and main
website.
But the problem is they are all unsecure. I can''t seem to find any web service examples
where they use authentication, or ssl.
Just wondering if anyone know how i go about doing this.
At the
2005 Dec 30
2
scgi apache routes help needed
I''m trying to get an application running in a sub directory of a site using
apache and scgi. The application runs fine with webrick.
I have a site. Let''s call it "mysite.org". There is a variety of content on
that site.
I would like to add a rails application to that site. Let''s call the
application "myapp".
So we will have urls of the form
2006 Jan 03
2
help me understand association attributes
I have a model with a belongs_to association. The first model is called
Thing and the associated model is User. I''m attempting to assign the user to
the thing.
To accomplish this I used a before_save method, like this:
class Thing < ActiveRecord::Base
belongs_to :created_by, :class_name => "User", :foreign_key =>
"created_by_user_id"
def before_create
2006 Feb 07
11
breaking down a list view
I''m trying to figure out how to change the order of a list view and it''s
obvious to me that I don''t understand what I get from a simple scaffold
to know enough to alter it.
If someone would be so kind to tell me what this means ...
def list
@placment_pages, @placements = paginate :placements, :per_page => 10
end
@placement_pages, # I am guessing that this
2006 Feb 07
14
Production Server That Just Works?
Hi,
Love Rails...
I''m looking for a Production Quality Server that brings the same ease of
use as Rails does to web development.
I''ve tried TextDrive, and never got it to work. I''m sure there are good
reasons why it didn''t work but they are beyond me. I''ve contacted tech
support there several times, and it seems that there are so many setups
that
2006 Feb 14
5
SSL and domain as account key
Say I have an hosted application which allows the user to use their own
domain name (company.com) to access it, and that application must be
accessed over SSL, how do you go about our SSL certificate not being
registered to their domain. Sure the connection will be safe but the
browser will pop up a warning saying the certificate is invalid for this
domain.
I dont think this problem occur
2006 Jan 14
1
form fields WITHOUT table columns? Can we validate these in the model?
I would like to have a field on a form that does *not* have an underlying
column in the table.
Yet I would like to perform some validation on the value. I would like the
results of the validation to show up
just like the validations that are performed in the model.
This is very similar to the password_confirmation field on a sign up screen.
The password_confirmation is
there on the screen, but
2006 Jan 23
8
OT: Problem rotating logs with lighttpd
Hi everybody,
this is a little OT. We are using Lighttpd as a webserver for Rails.
Our problem is that when we rotate the logs everyday at the end of the
process, lighttpd stops writing the logs. To solve this we have to
restart the server manually each time.
We use a common Debian, lighttpd-1.4.7, Rails 1.0 and fcgi-2.4.0.
I have tracked the lighttpd bugs, and I haven''t found
2006 Jan 24
2
collect array values
This may be more of a Ruby question, but I wasn''t sure.
Is there a way to run a find on a model and then save two fields as
key => value in an array for each row. Then use this array on the
template for checking if various checkbox or select values are
checked? I''m trying to avoid running one query to check the value for
each box in the form.
- Kyle
2006 Jan 22
11
ActiveRecord find
Suppose I have three tables - authors, posts and topics.
Every post have a topic and every topic has an author, so I have
posts.topic_id and topic.author_id. When the author is guest (not
registered), author_id is nil.
I need to find all the posts (in one query) where every post have all
the information of the topic and the auther, so if p is one of those
posts I could get the name of the
2006 Jan 24
3
what this line means exactly? (@@active_connections ||= {})
Hi,
I have problem to understand this line does exactly?
this is from the class ConnectionSpecficication,
methode "active_connections"
def self.active_connections #:nodoc:
if allow_concurrency
Thread.current[''active_connections''] ||= {}
else
@@active_connections ||= {}
end
end
what the line "@@active_connections ||= {}" means
exactly?
as I
2006 Feb 22
3
is there really a restart task in switchtower? How do you invoke it?
I just created a new rails project "test".
I then did "switchtower --apply-to ~/user/test test"
I then moved into test and tried "rake restart" and got:
kfelkins@lurch:~/user/test$ rake restart
(in /home/kfelkins/user/test)
rake aborted!
Don''t know how to build task ''restart''
I see restart in deploy. Can restart be invoked from the
2006 Feb 14
18
Does shared hosting work? Anywhere?
I moved a rails application to textdrive using their low-cost shared plan.
Once on textdrive my app would display ''proxy errors'' periodically. Hitting
reload
seemed to be all that was needed to get past the proxy error.
After discussions with their support people I decided the proxy errors were
being caused by apache server restarts -- because there were many of us
sharing
one
2006 Apr 20
8
Whats the best way to do this?
I have an archive that can have 0 or more extra files associated with
it.
I would like to be able to edit the associated files info on the same
page as the archive info.
Listing the extra files info to the edit form is simple enough, but How
do I form the text input fields for easy (or automatic) pick-up in the
update?
Or am I barking up the wrong tree here?
--
Posted via
2006 Feb 15
12
Does your *shared* hosting account work without errors?
Does your *shared* hosting account work without errors?
I''m interested in both positive and negative reports. If you are willing,
please contribute
- name of the hosting service
- how long you have used them
- your experience ("flawless!", "it''s crap!")
You *do not* need to reply saying your VPS service works great. This is
about *shared* hosting
2006 Feb 14
3
is shared hosting evil?
I moved a rails application to textdrive using their low-cost shared plan.
Once on textdrive my app would display ''proxy errors'' periodically. Hitting
reload
seemed to be all that was needed to get past the proxy error.
After discussions with their support people I decided the proxy errors were
being caused by apache server restarts -- because there were many of us
sharing
one
2006 Jul 23
2
Recommendations for managing tests for non-models and non-controllers in rails?
I''ve got unit tests for a class library that I''m using in a rails project.
Currently this is the only project using this library so I would like to
keep the classes and tests in the rails project. I moved the classes under
[app]/lib. I currently have the tests in [app]/test.
It would be great if these tests were run every time I run ''rake''. What is
everyone
2006 Feb 22
2
sudo in switchtower and security
I''m attempting to deploy a rails application using switchtower. My IT guys
are refusing to give me sudo for a user changeable script. I really can''t
argue with their logic. If I have sudo for a script that I can update, well,
I can do most anything I want.
They are suggesting I create a cgi that performs the same function. Since
the cgi would run as www-data (this is a debian