[Rails] why can't I add a :class to text_field?

2009-06-07 Thread Zhenning Guan
<%= text_field_tag 'login' ,nil, {:class => 'line'} %> the old way work. <%= f.text_field :login, :class => 'line' %> but why this doesn't. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Rails] Remove special characters from sentence

2009-06-07 Thread Sandip Ransing
Hi All, What is regular expression to remove special chars from a sentence and replace spaces with hypen ?? Thanks, Sandip R~ -- Ruby on Rails Developer http://sandip.sosblog.com http://funonrails.wordpress.com www.joshsoftware.com --~--~-~--~~~---~--~~ You rece

[Rails] Inner Join help

2009-06-07 Thread Scott Holland
Hello! I want to limit my model to just show companies from the current users account: user.account.companies I have this in my model which seems to be working: def self.find(*args) args << {:conditions => X"} super end Now I just need to turn this sql into rails conditions: SE

[Rails] Re: ActiveRecord Classes

2009-06-07 Thread J. D.
Hi Fred, I think I will use this for my find parameter: start_date = Time.now.beginning_of_week end_date = Time.now.end_of_week @rushing_offenses = RushingOffense.find(:all, :conditions => ['created_at > ? and created_at < ?', start_date, end_date]) That will let me find anything creat

[Rails] Re: Deployment Question

2009-06-07 Thread Maurício Linhares
Don't use the glassfish app server for that, it's overkill, use a lightweight solution like jetty -> http://jetty.mortbay.com/ Download the binary, generate a war file for your project using warbler and then copy the .war file to the "your jetty install folder"/webapps. Start jetty and the applic

[Rails] Re: link_to from controller

2009-06-07 Thread Maurício Linhares
You can't and shouldn't be doing this inside a controller. Just do it in the view. - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://codeshooter.wordpress.com/ (en) On Mon, Jun 8, 2009 at 12:01 AM, Valen Onish wrote: > > I need to use 'link_to' dynamically in my view. > > S

[Rails] link_to from controller

2009-06-07 Thread Valen Onish
I need to use 'link_to' dynamically in my view. So, in my controller I wrote: @right_part = " <%= link_to( 'Next', :action => '/index', :id => 3)%>" And in my view I'm trying to get a link: <%= @right_part %> But all this doesn't work. Help me. -- Posted via http://www.ruby-forum.com/.

[Rails] Re: ActiveRecord Classes

2009-06-07 Thread J. D.
By the way Fred, I really do appreciate you taking the time to help me and isolate some of my issues. I want to be proactive with my own code and later on with helping others. My goal is to gain an understanding of best practice methods and start utilizing those methods in my code from the s

[Rails] Re: ActiveRecord Classes

2009-06-07 Thread J. D.
Frederick Cheung wrote: > > Sounds like you shouldn't be using update_all at all here, rather you > should be using find to find an appropriate row to update and if there > is none, create a new one. > > Fred Again, the problem is I don't know how. I'm simply guessing based on what I see with

[Rails] Re: Ruby w/ Apache mod_proxy

2009-06-07 Thread Rick DeNatale
On Sun, Jun 7, 2009 at 8:25 PM, JannaB wrote: > > But that's not what I want. I need Apache listening on port 80, > routing it to the glassfish gem running on 81 (or any other port other > than 80) I think you need to understand how Apache virtual hosts work, particularly the difference between i

[Rails] Re: ActiveRecord Classes

2009-06-07 Thread Frederick Cheung
On Jun 8, 12:22 am, "J. D." wrote: > Hi Fred, > puts "Updating Team Name = #{offensive_rushing.rows[i][1]}." > --> Print me out an update to show me that you are updating the teams > RushingOffense.update_all(:name => offensive_rushing.rows[i][1], >         :games => offensive_rushing.rows[i][

[Rails] Re: Use of Models - The Very Basics

2009-06-07 Thread Marnen Laibow-Koser
Doug Jolley wrote: [...] > Do we only use models with databases or do they have other uses? They certainly have other uses. Models represent any domain object that you need. Sometimes these objects will correspond to DB records, sometimes not. > > Models descend from ActiveRecord::Base. Tha

[Rails] Re: Ruby w/ Apache mod_proxy

2009-06-07 Thread JannaB
But that's not what I want. I need Apache listening on port 80, routing it to the glassfish gem running on 81 (or any other port other than 80) On Jun 7, 12:28 pm, Rick DeNatale wrote: > On Sun, Jun 7, 2009 at 9:37 AM, JannaB wrote: > > So I am trying to mod_proxy the site to the url with port 8

[Rails] Re: embed php code in rails

2009-06-07 Thread Marnen Laibow-Koser
istar...@gmail.com wrote: [...] > Oh, and where are the php error log files > located? PHP generally puts its errors into the Apache server's error log, if I remember correctly. > > Thank you, > > Frank Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http:

[Rails] Re: ActiveRecord Classes

2009-06-07 Thread J. D.
Hi Fred, Yeah I'm stuck with this one. I've checked the documentation but I'm just not following it. What I basically need it to do is to update the table with the data that's parsed into @rows. In this case @rows is listed by: offensive_rushing.rows[i][1] (:name) offensive_rushing.rows[i][

[Rails] Re: Missing Template when testing with the Brain Buster Captcha partial

2009-06-07 Thread Matt W.
Just to experiment, I used this instead: <%= render :partial => "#{RAILS_ROOT}/vendor/plugins/brain_buster/ views/brain_busters/captcha.html.erb" unless action_name == 'edit' %> and now I get the following error: ActionView::TemplateError: Called id for nil, which would mistakenly be 4 -- if yo

[Rails] Re: ActiveRecord Classes

2009-06-07 Thread Frederick Cheung
On Jun 8, 12:02 am, Frederick Cheung wrote: > On Jun 7, 10:01 pm, "J. D." wrote: > > > > > Any ideas of what I might be doing wrong? > > You're not using update_all correctly - check the documentation > Well the documentation may not mention the usage you are using, but it does exist, sorry ab

[Rails] Re: Missing Template when testing with the Brain Buster Captcha partial

2009-06-07 Thread Matt W.
Thanks, but unfortunately, that had no affect…have you ever run into this kind of thing before? On Jun 7, 2:27 pm, Rob Biedenharn wrote: > Take off the slash? > >    <%= render :partial => 'captcha' unless action_name == 'edit' %> > > -Rob > > Rob Biedenharn          http://agileconsultingllc.co

[Rails] Re: ActiveRecord Classes

2009-06-07 Thread Frederick Cheung
On Jun 7, 10:01 pm, "J. D." wrote: > > Any ideas of what I might be doing wrong? You're not using update_all correctly - check the documentation Fred > > This still has been a great day because even though I've seen tons of > errors, I'm learning.. > > -- > Posted viahttp://www.ruby-forum.com/

[Rails] Re: embed php code in rails

2009-06-07 Thread istar...@gmail.com
Conrad, I'm trying to drop Wordpress into the public folder of my rails project, just as you said. Did you have any trouble with the index.php files? Some error is causing them to return blank pages. It's frustrating, because if I manually type in www.satslayer/blog/wp-admin/index.php I can see

[Rails] Re: Plugins not loading in production environment

2009-06-07 Thread Alastair
I think I may have this figured out.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group,

[Rails] Re: Deployment Question

2009-06-07 Thread Vivek Pandey
To host multiple applications, on the same server, you should be using the glassfish application server (not glassfish gem). So , let say you have a running glassfish v3 server and lets say you have two apps in directories ~/apps1 ~/apps2 You would deploy them as: asadmin deploy ~/apps1 asadmi

[Rails] Plugins not loading in production environment

2009-06-07 Thread Alastair
I'm moving this query out from my earlier post. This is all I can assume that is happening here. When I run my site in production, any methods that call plugin functionality is failing. If I have methods in my models that call a plugin, running script/server -e production fails to launch with an e

[Rails] Re: Use of Models - The Very Basics

2009-06-07 Thread Rob Biedenharn
On Jun 7, 2009, at 2:28 PM, doug wrote: > Embarrassingly, I must admit that I have never understood models. I > am hoping that with this post I can clear up a basic question that > will allow me to get a toe-hold into understanding models. The basic > question is this: > > Do we only use models

[Rails] Redcar (was: Rails Code Indentation)

2009-06-07 Thread Davi Vidal
Em 06-06-2009 10:34, JannaB escreveu: > What do you use asa good RoR editor then? > What do you (all the list) think about Redcar? http://redcareditor.com/ I'm using it actually and thought that I can be a very good editor. davi --~--~-~--~~~---~--

[Rails] Re: Error in production only: `method_missing': undefined method `has_attachment' for # (NoMethodError)

2009-06-07 Thread Alastair
Ok, Turns out when I comment out any references to attachment_fu and restful_authentication in my models, I can run the site in production mode. Obviously this doesn't help as I need both those plugins working :) --~--~-~--~~~---~--~~ You received this message beca

[Rails] Re: Missing Template when testing with the Brain Buster Captcha partial

2009-06-07 Thread Rob Biedenharn
Take off the slash? <%= render :partial => 'captcha' unless action_name == 'edit' %> -Rob Rob Biedenharn http://agileconsultingllc.com r...@agileconsultingllc.com On Jun 7, 2009, at 12:22 AM, Matt W. wrote: > > When I run my functional tests, they throw an error with the following

[Rails] Re: Error in production only: `method_missing': undefined method `has_attachment' for # (NoMethodError)

2009-06-07 Thread Alastair
On Jun 7, 10:01 pm, Alastair wrote: > > In lieu of any better suggestions you could change it back to > > production.rb one line at a time till you find the one causing the > > problem. > In lieu of any better suggestions you could change it back to > production.rb one line at a time till you

[Rails] Re: ActiveRecord Classes

2009-06-07 Thread J. D.
Frederick Cheung wrote: > > Does Scraper need to be an activerecord class at all ? you could pass > to it the class whose table needs to be updated ie > > def do_something(some_klass) > some_klass.update_all(...) > end > > or perhaps you might want to couple things a little more loosely > >

[Rails] Re: Error in production only: `method_missing': undefined method `has_attachment' for # (NoMethodError)

2009-06-07 Thread Alastair
> In lieu of any better suggestions you could change it back to > production.rb one line at a time till you find the one causing the > problem. I've been trying that also, without much success so far. I'll keep at it though! this is possibly the most bizarre thing ever. I'm wondering if I'm missi

[Rails] Re: Error in production only: `method_missing': undefined method `has_attachment' for # (NoMethodError)

2009-06-07 Thread Colin Law
2009/6/7 Alastair : > > > > On Jun 7, 9:08 pm, Frederick Cheung > wrote: >> On Jun 7, 8:18 pm, Alastair wrote: >> >> > Hello guys, >> >> > I'm having a problem with running an application in production. The >> > error I'm getting is as follows: >> >> Random guess: is there is a line at the botto

[Rails] Re: modify root URL generated by <%= link_to %>

2009-06-07 Thread Richard Schneeman
I tried setting the default_url_options in my config/environments.rb like this: config.action_controller.default_url_options = { :host => 'example.com'} but I get this error when i restart my server I get this error, is there another way to accomplish this taks? /opt/local/lib/ruby/gems

[Rails] Re: Error in production only: `method_missing': undefined method `has_attachment' for # (NoMethodError)

2009-06-07 Thread Alastair
On Jun 7, 9:08 pm, Frederick Cheung wrote: > On Jun 7, 8:18 pm, Alastair wrote: > > > Hello guys, > > > I'm having a problem with running an application in production. The > > error I'm getting is as follows: > > Random guess: is there is a line at the bottom of environment.rb that > requires

[Rails] Re: Need help 'observe_field' to work in Safari or Konqueror

2009-06-07 Thread Jim Burgess
That'll teach me to re-read things before I post. The URL is: http://igsn-application.de/test/ Sorry! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" g

[Rails] Need help 'observe_field' to work in Safari or Konqueror

2009-06-07 Thread Jim Burgess
Hi, I have a form with two drop down menus. Depending on what the user selects in the first, the second should be populated accordingly. Here is the code I am using to do this. View (test.html.erb): <% form_for :applicant, :url=> {:action => "index"} do |f| %> <%= f.label :topic_1 %> <%= f.sel

[Rails] Re: ActiveRecord Classes

2009-06-07 Thread Frederick Cheung
On Jun 7, 8:30 pm, "J. D." wrote: > I think I found my own answer to the last question - a single class > cannot inherit across multiple classes. :( > Does Scraper need to be an activerecord class at all ? you could pass to it the class whose table needs to be updated ie def do_something(some

[Rails] Re: Error in production only: `method_missing': undefined method `has_attachment' for # (NoMethodError)

2009-06-07 Thread Frederick Cheung
On Jun 7, 8:18 pm, Alastair wrote: > Hello guys, > > I'm having a problem with running an application in production. The > error I'm getting is as follows: Random guess: is there is a line at the bottom of environment.rb that requires whatever it is that provides the has_attachment method? Fr

[Rails] Re: Rails Code Indentation

2009-06-07 Thread Scott Tamosunas
RubyMine has an excellent code formatter. Just write your code and Cmd- Option-L. Scott On Jun 7, 9:07 am, prabesh shrestha wrote: > Netbeans is good for that. > On Jun 7, 8:04 am, Mohit Sindhwani wrote: > > > JannaB wrote: > > > What do you use asa good RoR editor then? > > > NetBeans indents

[Rails] Error in production only: `method_missing': undefined method `has_attachment' for # (NoMethodError)

2009-06-07 Thread Alastair
Hello guys, I'm having a problem with running an application in production. The error I'm getting is as follows: /home/www/bandera/releases/20090607191259/vendor/rails/activerecord/ lib/active_record/base.rb:1964:in `method_missing': undefined method `has_attachment' for # (NoMethodError)

[Rails] Re: ActiveRecord Classes

2009-06-07 Thread J. D.
I think I found my own answer to the last question - a single class cannot inherit across multiple classes. :( -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rai

[Rails] Re: ActiveRecord Classes

2009-06-07 Thread J. D.
Another thing I considered is inheritance. If I do class Scraper < RushingOffenses then the RushingOffenses class located in the rushing_offense.rb model would inherit it. Then I could possibly put the following in my rake task: offensive_rushing = RushingOffense::Scraper.new However, I wou

[Rails] Re: Use of Models - The Very Basics

2009-06-07 Thread Christoph Jasinski
I'm not a Rails pro, but I would like to make the following comments: A model - represents your Data you deal with, like students/products... which you save in a database! - should include operations/methods which exclusively deal with the object/data, like setter/getter moethds and/or

[Rails] Re: ActiveRecord Classes

2009-06-07 Thread J. D.
To add another thought to the mix: The only reason why I'm defining a rake task is that eventually the rake task will be managed by a cron job for populating the data for my database on a weekly basis (say every sunday night). The main bulk of the remainder of my project will just be dealing w

[Rails] Re: ActiveRecord Classes

2009-06-07 Thread J. D.
To expand upon the issue: There are approximately 37 different categories for College Football that house statistics. I will be parsing 37 different URLs to pull and retrieve data that will be pushed to my database. The Scraper class is the tool for doing that. Each call within my rake task

[Rails] Re: Deployment Question

2009-06-07 Thread JannaB
If I am using only Glassfish, and deploying to say, port 80 how can I handle multiple sites (multiple rails root dirs) on the same machine? -JannaB On Jun 5, 1:12 pm, Vivek Pandey wrote: > > Vivek, you might want to create a screencast on how to deploy a Rails > > application > > using JRuby

[Rails] Re: namespaced application layout?

2009-06-07 Thread elliottg
Thanks Maurício. That worked nicely. On Jun 5, 11:02 pm, Maurício Linhares wrote: > Create a basic admin controller, like this: > > class Admin::BaseController < ApplicationController >     layout :admin > end > > Then make all admin controllers inherit from it. And also create an > layouts/adm

[Rails] Use of Models - The Very Basics

2009-06-07 Thread doug
Embarrassingly, I must admit that I have never understood models. I am hoping that with this post I can clear up a basic question that will allow me to get a toe-hold into understanding models. The basic question is this: Do we only use models with databases or do they have other uses? Models

[Rails] ActiveRecord Classes

2009-06-07 Thread J. D.
I'm having a little trouble with understanding how to work out the schematic for some of my classes using ActiveRecord when a file is in my lib directory: Brief example: Here's the outline of the files in use: app controllers application_controller.rb rushing

[Rails] Re: Rails way to do long running tasks

2009-06-07 Thread Bharat
Two pointers from personal experience: 1. Don't use backgroundrb for asynchronous processing 2. Do use javan-whenever to automate your cron jobs (available on Github) Bharat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

[Rails] Re: XML::LibXML::Reader

2009-06-07 Thread lecielbleu
ok Jeff i solved problem , using "doc" was a bad mistake :) thanks for your support ,here is the last codes while reader.read case reader.name when "Brand_name" name_from_xml = reader.read_stri

[Rails] Re: How to access parent property

2009-06-07 Thread Developer In London
That Works! Thanks! 2009/6/7 Marnen Laibow-Koser > > developerinlondon wrote: > > Hi, > > > > I am having difficulties accessing parent properties/attributes from > > the child. Anyone could shed some lights onto this? > > > > Heres a sample code: > [...] > > Your sample code will not do the job

[Rails] modify root URL generated by <%= link_to %>

2009-06-07 Thread Richard Schneeman
Is there a way to manually specify the root url that a <%= link_to %> generates? So i can make an auto generated url that used to go to mywebsite.myhost.com/comments be go to example.com/comments ? The reason, if you're wondering is that I have hosting at a site and my domain forwarded and maske

[Rails] Re: why do restful_authentication generated rspec tests fail?

2009-06-07 Thread Jonathan
Many thanks for the explanation. Just what I needed to know. On Jun 8, 2:00 am, Maurício Linhares wrote: > They break 'cos they rely in a old Rspec behaviour for matching routes. > > The best you can do is just remove all restful_auth specs and cucumber > scenarios (they're HORRIBLE, btw, you p

[Rails] Re: How to access parent property

2009-06-07 Thread Marnen Laibow-Koser
developerinlondon wrote: > Hi, > > I am having difficulties accessing parent properties/attributes from > the child. Anyone could shed some lights onto this? > > Heres a sample code: [...] Your sample code will not do the job. All you need is class Parent > ActiveRecord::Base has_many :chil

[Rails] Re: Advice for quick fire DB replication with Rails

2009-06-07 Thread yitzhakbg
Thanks On Jun 7, 7:03 pm, Roderick van Domburg wrote: > Yitzhak Bar Geva wrote: > > Let's say we had to go it on our own, could you or anyone else > > recommend the quicky recipe I'm seeking? > > Doing a Google search for "mysql heartbeat" should yield some candidate > results. > Generally: > >

[Rails] Re: Rails way to do long running tasks

2009-06-07 Thread Matt Jones
For emails, the simplest way is to set up a local MTA (postfix, for instance) and send the mail to that. The MTA takes care of the hard part delivering the mail as needed. For more general things, there are some gems that let you set up cron- like tasks, or you can just call a rake task from plai

[Rails] Re: why do restful_authentication generated rspec tests fail?

2009-06-07 Thread Maurício Linhares
They break 'cos they rely in a old Rspec behaviour for matching routes. The best you can do is just remove all restful_auth specs and cucumber scenarios (they're HORRIBLE, btw, you probably won't understand anything anyway and any change is going to be a PITA) and just write your own specs and Cu

[Rails] why do restful_authentication generated rspec tests fail?

2009-06-07 Thread Jonathan
Been searching online for an answer to this without success - also been digging through the documentation but I'm still very new to rails. I started a brand new app (rails 2.3.2), then the first thing I did was install restful_authentication with the --rspec and -- include_activation options, the

[Rails] Re: Ruby w/ Apache mod_proxy

2009-06-07 Thread Rick DeNatale
On Sun, Jun 7, 2009 at 9:37 AM, JannaB wrote: > So I am trying to mod_proxy the site to the url with port 81 that I > know works. Here is how I have the VirtualHost in my httpd.conf file > set up: > > >    ServerName gg ... > > ... > whenever I go to hit http://127.0.0.1/gg I get a 404 not fou

[Rails] Re: Calendar Plugin

2009-06-07 Thread prabesh shrestha
Thanks bjreath and Wlater for your suggestions.I was completing some other tasks.Now I am using calendar_helper.I am going through it's code which is pretty small than I had guessed.If I need any help I will surely post back. Thanks again. On May 29, 10:01 am, Walter McGinnis wrote: > http://git

[Rails] Re: Rails Code Indentation

2009-06-07 Thread prabesh shrestha
Netbeans is good for that. On Jun 7, 8:04 am, Mohit Sindhwani wrote: > JannaB wrote: > > What do you use asa good RoR editor then? > > NetBeans indents very well. > Cheers, > Mohit. > 6/7/2009 | 11:03 AM. --~--~-~--~~~---~--~~ You received this message because you

[Rails] Re: Advice for quick fire DB replication with Rails

2009-06-07 Thread Roderick van Domburg
Yitzhak Bar Geva wrote: > Let's say we had to go it on our own, could you or anyone else > recommend the quicky recipe I'm seeking? Doing a Google search for "mysql heartbeat" should yield some candidate results. Generally: 1. Set up a master/master MySQL configuration on two nodes as usual.

[Rails] Re: How do i model this in Rails? (put down java equivalent design)

2009-06-07 Thread AGoofin
Does seem to be a bit of repetition in your description but it seems straightforward. You have a Module which has an Entity_type column Each Module has many Chapters where Chapters has a column named module_id. Each Chapter has many Activities with similar foreign key constraints or You have on

[Rails] Re: GeoLocation for any Cell Phone with GPS

2009-06-07 Thread AGoofin
A quick Google search turned up a few possibilities: (ruby geolocation) http://earthcode.com/blog/2007/02/geokit_map_plugin.html There are a few ways though to take a lat/long and transpose them to a map or do other fun things with them. Try looking at Google maps as well. On Jun 6, 1:47 pm, f

[Rails] Re: Ruby w/ Apache mod_proxy

2009-06-07 Thread JannaB
maybe you cannot do this with Apaqche 1.3.33 ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from th

[Rails] Iconv::InvalidEncoding (""ISO-8859-1"", "UTF-8")

2009-06-07 Thread Ariel Sch
Hi, I'm having the error: Iconv::InvalidEncoding: invalid encoding (""ISO-8859-1"", "UTF-8") when trying to post via Mechanize. It used to work just fine, but the error appeared after (I think) upgrading to Rails 2.3.2, Ruby 1.8.7, Mechanize 0.9.2 (I upgraded a while ago and only now noticed th

[Rails] Re: Rake Tasks

2009-06-07 Thread J. D.
Thanks - I understand that part now! I put scraper.rb in my Libs folder I put scraper.rake in my libs/tasks I took the end portion of scraper.rb and removed it placing it in my rake file: desc "This task will parse data from ncaa.org and upload the data to our db" task :scraper => :environmen

[Rails] Re: Rake Tasks

2009-06-07 Thread J. D.
Frederick Cheung wrote: > On Jun 7, 1:40�pm, "J. D." wrote: >> include anything to call that .rb file? �I'm sorry if I am >> misunderstanding this portion of the mechanics. >> >> > Because your task depends on :environment Rails is loaded, in > particular its dependency management is loaded so it

[Rails] Re: How to access parent property

2009-06-07 Thread Developer In London
No I need to have it so that Child has one parent. I managed to get a reference to the parent by using the ObjectSpace. But its almost a hack then a nice way of doing it. 2009/6/7 Conrad Taylor > > Hi, when I saw your models, I was thinking that you should have the > following relationships: >

[Rails] Subject: [ANN] ri_cal 0.6.1 Released

2009-06-07 Thread Rick DeNatale
ri_cal version 0.6.1 has been released! This version has no functional changes from 0.6.0, it fixes an obscure problem with the spec:with_activesupport rake task, found by Paul Scott-Murphy * * A new Ruby implementation of RFC2445 iCalendar. The existing Ruby iC

[Rails] Re: Ruby w/ Apache mod_proxy

2009-06-07 Thread JannaB
Fred, It does not appear to be -- when I check my gg/logs and gg/logs/ mongrel_ debug logs there is nothing mentioning an error here On Jun 7, 9:42 am, Frederick Cheung wrote: > On Jun 7, 2:37 pm, JannaB wrote: > > > whenever I go to hithttp://127.0.0.1/ggIget a 404 not found error. > > I am c

[Rails] Re: Ruby w/ Apache mod_proxy

2009-06-07 Thread Frederick Cheung
On Jun 7, 2:37 pm, JannaB wrote: > whenever I go to hithttp://127.0.0.1/ggI get a 404 not found error. > I am certain my document root is correct. Can you fellows here who > have done this tell me what I am missing? Thanks, Janna B. Who is throwing the 404 ? Is it rails telling you it doesn't

[Rails] Re: Ruby w/ Apache mod_proxy

2009-06-07 Thread JannaB
I must also mention I have: LoadModule jk_module modules/mod_jk.so in httpd.conf --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@goo

[Rails] Ruby w/ Apache mod_proxy

2009-06-07 Thread JannaB
Yes, I know this is more specifically an Apache question, but you guys in this group know this stuff forwards & backwards it seems. I am running the glassfish gem (in lieu of mongrel) on port 81. If I go to http://127.0.0.1:81 I get my rails app up beautifully. Unfortunately, I am also required t

[Rails] Re: How to access parent property

2009-06-07 Thread Conrad Taylor
Hi, when I saw your models, I was thinking that you should have the following relationships: Parent has many children Child has many parents Thus, you should have the following database tables: children and parents. By doing this, this becomes a many to many relationship. Good luck, -Co

[Rails] Re: Advice for quick fire DB replication with Rails

2009-06-07 Thread yitzhakbg
As nice as that sounds, it might not fly for two reasons: 1. Security: We probably won't be authorized to place the app on the Internet. Until now, it's all privately hosted on closed connections (perhaps if we could establish a closed connection...) 2. Latency. We're in Israel and the servers are

[Rails] Re: Administration Subsystem

2009-06-07 Thread Carl
As far as something that makes it easy to add new users, roles, etc you could look into adding ActiveScaffold to your app. http://wiki.github.com/activescaffold/active_scaffold I was designed for acting as admin pages, and the interface is pretty nice for things like that. I use it in a project f

[Rails] Re: Rake Tasks

2009-06-07 Thread Frederick Cheung
On Jun 7, 1:40 pm, "J. D." wrote: > Maurício Linhares wrote: > > This custom file should be called scraper.rb and should be placed at > > the /lib folder of your application. In a rake task you don't really > > access or call controllers, you just run the task, which is telling > > the scrapper

[Rails] Re: Rake Tasks

2009-06-07 Thread J. D.
Maurício Linhares wrote: > This custom file should be called scraper.rb and should be placed at > the /lib folder of your application. In a rake task you don't really > access or call controllers, you just run the task, which is telling > the scrapper to load the data and then save it to the DB. >

[Rails] Re: How does controller call render when there's no render in action

2009-06-07 Thread Vojto
Sweet, so I totally missed perform_action method :) Thanks :) On Jun 6, 3:01 pm, Frederick Cheung wrote: > On Jun 6, 12:17 pm, Vojto wrote: > > > I have a question. > > > "send(method, *arguments)" this calls action of a controller, right? > > not quite - (at least in the common) case, the me

[Rails] Re: Autocomplete Plugin - how can I use same "text_field_with_auto_complete" twice on one page?

2009-06-07 Thread Pat Shaughnessy
I ran into the same problem a while back and forked the plugin to fix it; see: http://patshaughnessy.net/repeated_auto_complete Hope this helps, - pat On Jun 2, 1:51 pm, Andy wrote: > Any ideas here? > > On May 28, 1:49 pm, Andy wrote: > > > I'm trying to use an autocomplete twice on the same

[Rails] Re: Advice for quick fire DB replication with Rails

2009-06-07 Thread Roderick van Domburg
Yitzhak Bar Geva wrote: > We need an "out-of-the-box" sure-fire DB replication setup with > automatic failover for our Rails app. We haven't done it before. We'd > appreciate advice on what the simplest, surest, quickest method would > be (no more that one master/slave necessary, or two masters wo

[Rails] Re: [ANN] SQL Server Adapter 2000/2005/2008

2009-06-07 Thread Roderick van Domburg
Ken Collins wrote: > The SQL Server adapter I've been working on for the past 6 months or > so now passes all the tests in rails 2.2 and 2.3 for all SQL Server > versions. It is also Ruby 1.9 compatible, UTF-8 support, etc. Tons of > info can be found in the README on github. Many thanks for your

[Rails] How to access parent property

2009-06-07 Thread developerinlondon
Hi, I am having difficulties accessing parent properties/attributes from the child. Anyone could shed some lights onto this? Heres a sample code: class Parent < ActiveRecord::Base :has_many => :childs @connector def before_save @connector = 'some connector object' 0..9.do |count|

[Rails] Advice for quick fire DB replication with Rails

2009-06-07 Thread yitzhakbg
We need an "out-of-the-box" sure-fire DB replication setup with automatic failover for our Rails app. We haven't done it before. We'd appreciate advice on what the simplest, surest, quickest method would be (no more that one master/slave necessary, or two masters working master/master). Which gems

[Rails] Re: Rails way to do long running tasks

2009-06-07 Thread Phlip
Chris wrote: >* how to send emails without making the user wait Either Thread.new{}, or a plugin called Spawn. You need the latter if your e-mails call templates which in turn call ActiveRecord. A separate thread requires a separate database connection, and Spawn handles this. >*

[Rails] Re: How do i model this in Rails? (put down java equivalent design)

2009-06-07 Thread Frederick Cheung
On Jun 7, 3:29 am, Ritvvij wrote: > Hello guys, > > Need help!! Finding it hard to model the 'model' :P within the given > rails associations. > > In java terms, my requirements are... > > There are 3 entities - module, chapter and activity. > > Chapter entity is a specilization of Module entit

[Rails] Re: Mongrel not playing nicely with older rails/ruby

2009-06-07 Thread Frederick Cheung
On Jun 7, 2:09 am, rusty wrote: > Ok, now I get this...? Any clue as to what I'm missing? > that looks like your app is requiring ruby-debug but that the gem isn't installed Fred > ** Starting Mongrel listening at 0.0.0.0:3000 > ** Starting Rails with development environment ... > /usr/local/l

[Rails] Rails way to do long running tasks

2009-06-07 Thread Chris
Hello Rails community, I would like to get some advices - I am writing a web application that will be sending some emails and execute other long running tasks. Some of these tasks may take some time and I do not want the user experience to be impacted. I would appreciate any pointers on advi

[Rails] [ANN] SQL Server Adapter 2000/2005/2008

2009-06-07 Thread Ken Collins
Small announcement. The SQL Server adapter I've been working on for the past 6 months or so now passes all the tests in rails 2.2 and 2.3 for all SQL Server versions. It is also Ruby 1.9 compatible, UTF-8 support, etc. Tons of info can be found in the README on github. http://github.com/rails-s

[Rails] Learning Rails 1st Edition - Form Builders - Confuzzled

2009-06-07 Thread Rilindo Foster
Hi! Rails newbie here - so far, loving it. Going through the Learnings Rails book and the for the most part, I am learning quite a bit (in spite of the errata). I did see something odd. On 8.2.2, when I invoke the following private method: def text_field(method, options={}) label_for(