[Rails] Re: Google App Engine

2009-10-24 Thread rails.n...@gmail.com
Heroku seems quite expensive... the $50 Crane recommended for small business apps quickly becomes $158 when you follow their recommended number of Dynos. And there is no mention of bandwidth costs. Meanwhile GAE is offering 5million page views free per month.

[Rails] Re: Google App Engine

2009-10-24 Thread rails.n...@gmail.com
With BigTable I think there would be a considerable amount of re- thinking needed to get Rails to use it effectively. From what I've read, Google app engine wont necessarily scale well if you blindly attempt to use it in a similar fashion as relational databases GAE is not a great

[Rails] Re: observe field is not working

2009-10-24 Thread saravanan bava
Hi Conrad, Thanks for ur reply. I want to update the model, %= observe_field(:one_new_col, :url = { :action = :live_search }), :frequency = 0.5, :update = :hits, :with = 'query' % I have put like this only, previous mail I typed wrongly sorry for

[Rails] Re: Rspec Tutorial

2009-10-24 Thread Rails ROR
Hi, I have tried in google for Rspec. I thought there might be few books also. Thankyou for your reply. On Fri, Oct 23, 2009 at 10:53 PM, Conrad Taylor conra...@gmail.com wrote: Hi, I really doubt that any one is going to write a book and make it free to download. Next, did you try

[Rails] Re: Am I reinventing polymorphic associations?

2009-10-24 Thread lwe
In most projects I'm using an initializer to load all lib/*.rb files, like: config/initializers/requires.rb: # auto-load all ruby files from RAILS_ROOT/lib/ Dir[File.join(RAILS_ROOT, 'lib', '*.rb')].each do |file| require file Note, if you have any files you do not want auto-loaded, you

[Rails] Inheritance Problem

2009-10-24 Thread Michael ..
Hello. I have a question to inheritance in Rails(2.3.4). I have this three models. class Vehicle ActiveRecord::Base end class Car Vehicle end class RallyCar Car end And this Migration: class CreateVehicles ActiveRecord::Migration def self.up create_table :vehicles do |t|

[Rails] Re: Currency helper

2009-10-24 Thread RVince
Inputting valid currency amounts in a textbox On Oct 23, 2:25 pm, Marnen Laibow-Koser rails-mailing-l...@andreas- s.net wrote: RVince wrote: Is there a helper method available for inputting currency amounts? What do you need a helper for? Best, -- Marnen

[Rails] Plugin not found: [git://github.com/collectiveidea/awesome_nested_set.git]

2009-10-24 Thread imdwalrus
I'm trying to install the awesome_nested_set plugin in a new project. From the project directory, I enter script/plugin install git://github.com/collectiveidea/awesome_nested_set.git . I keep getting the error message Plugin not found... I've tried this off and on all day thinking it might be

[Rails] Re: Inheritance Problem

2009-10-24 Thread Frederick Cheung
On Oct 24, 11:07 am, Michael .. rails-mailing-l...@andreas-s.net wrote: I have the same Problem in find. Car.find(:all) returns two Records RallyCar.count Car.find(:all) returns four Records This is a known pecularity of STI - when you do a count for the subclass it adds a type = Car

[Rails] Re: Deployment syntax error: fine in dev - what's happening?

2009-10-24 Thread Alan Fleming
Frederick Cheung wrote: Well the code looks wrong to me Indeed it is. I'm clearly blind. Thanks also for the info on the environmental differences. Makes perfect sense now. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this

[Rails] Re: Google App Engine

2009-10-24 Thread Conrad Taylor
Hi ALL, you can find a really good comparison here: http://rrees.wordpress.com/2009/10/08/heroku-versus-gae-gaej/ Good luck, -Conrad On Fri, Oct 23, 2009 at 11:14 PM, rails.n...@gmail.com rails.n...@gmail.com wrote: With BigTable I think there would be a considerable amount of re-

[Rails] Re: Has many through

2009-10-24 Thread Scott Holland
Then your associations, as given in your original posts, do not match your DB schema. According to your DB schema, you don't need has_many :through; instead, you need a polymorphic association such that a note can belong to either a guestlist or an event. Ok, so now I have the

[Rails] api routes with versions

2009-10-24 Thread Marcelo Barbudas
Hi, I've been trying to implement a versioned API, I went through different versions that I didn't like. I am wondering if I can do something like this with routes, and if it's possible how can it be implemented: api.example.com/items/show.xml works, no version

[Rails] Re: error: nested-routes with nested-model having foreign keys

2009-10-24 Thread nin_d
I see some issue with eager loading. This post is little confusing. I will create another one. --~--~-~--~~~---~--~~ 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

[Rails] issue with eager loading in nested routes

2009-10-24 Thread nin_d
Hi Everyone, I have issue while doing eager loading when url is = http://127.0.0.1:3001/projects/1/features I also did %= debug @features % to dump @feature object but I did not see 'owner' being eager-loaded. Can anyone find out why owner is not being 'eager-loaded'? Thanks in advance.

[Rails] Re: Error: uninitialized constant MysqlCompat::MysqlRes

2009-10-24 Thread grosser.michael
had the same, switching to 2.7 helps sudo gem install mysql -v 2.7 On 22 Okt., 17:33, Caleb Cullen rails-mailing-l...@andreas-s.net wrote: Andrew McDonough wrote: These instructions also worked for me after upgrading to Snow Leopard. In my case mysql was in /opt/local/lib/mysql5, so the

[Rails] Re: ANN: Mastering Ruby and Rails Training

2009-10-24 Thread JodyB
Looks like a great course. Any plans for offerings early in the new year? On Oct 21, 8:35 am, clarkware m...@pragmaticstudio.com wrote: Hi Folks, We're pleased to announce a new 4-day training course for practicing Rails developers called Mastering Ruby and Rails taught by Dave Thomas and

[Rails] Re: issue with eager loading in nested routes

2009-10-24 Thread Frederick Cheung
On Oct 24, 1:58 pm, nin_d ninadpachp...@gmail.com wrote: Hi Everyone, I have issue while doing eager loading when url is =http://127.0.0.1:3001/projects/1/features I also did %= debug @features % to dump @feature object but I did not see 'owner' being eager-loaded. Can anyone find out

[Rails] Re: issue with eager loading in nested routes

2009-10-24 Thread nin_d
Fred, owner do exist. class Feature ActiveRecord::Base belongs_to :project belongs_to :owner, :class_name = User, :foreign_key = owner_id end Now in features controller, I have @features = @project.features.find(:all, :include = :owner) and dump for @features in view is where i see only

[Rails] Re: issue with eager loading in nested routes

2009-10-24 Thread David A. Black
Hi -- On Sat, 24 Oct 2009, nin_d wrote: Fred, owner do exist. class Feature ActiveRecord::Base belongs_to :project belongs_to :owner, :class_name = User, :foreign_key = owner_id end Now in features controller, I have @features = @project.features.find(:all, :include = :owner)

[Rails] Re: issue with eager loading in nested routes

2009-10-24 Thread nin_d
Oops I had removed that myself. Damn! Consider this please - Now in features controller, I have @features = @project.features.find(:all, :include = :owner) and dump for @features in view is where i see only two features being loaded and not the corresponding owner (only 1 in this case, with id

[Rails] Re: issue with eager loading in nested routes

2009-10-24 Thread nin_d
In server log, I do see query for fetching users with id=1. How this is not appearing in the index view?? = Server Log Processing FeaturesController#index (for 127.0.0.1 at 2009-10-24 19:42:45) [GET] Parameters: {project_id=1} [4;36;1mProject Columns (0.0ms) [0m[0;1mSHOW FIELDS

[Rails] There is no server file in script folder

2009-10-24 Thread Karthikeyan
Hello, I installed ROR on my Ubuntu. I created a rails project using he command rails demo , when I try to run ruby script/server it shows an error like this : ruby: No such file or directory -- script/server (LoadError) The script folder has no file named server.rb , is there any fix for this

[Rails] Re: issue with eager loading in nested routes

2009-10-24 Thread Frederick Cheung
On Oct 24, 3:14 pm, nin_d ninadpachp...@gmail.com wrote: In server log, I do see query for fetching users with id=1. How this is not appearing in the index view?? Is there a user with id 1? Get it working without :include, then worry about the eager loading. Fred = Server Log

[Rails] Re: There is no server file in script folder

2009-10-24 Thread Karthikeyan
Well, when I create a ROR project in my home directory, everything is OK, the previous problem occurred because I created a project in mounted file system that originally belonged to windows. So problem solved :) On Oct 24, 7:47 pm, Karthikeyan mindas...@gmail.com wrote: Hello, I installed ROR

[Rails] Error in migrating the Postgres database

2009-10-24 Thread madhuri godade
I want to create a rails application using postgres database. Update a username and password terp and agile respectively. When i run the command rake db:create and rake db:migrate it is giving mi an error.. uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::PGconn

[Rails] Re: Error in migrating the Postgres database

2009-10-24 Thread nin_d
Hope u have the postgre adapter installed. --~--~-~--~~~---~--~~ 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

[Rails] Re: issue with eager loading in nested routes

2009-10-24 Thread nin_d
Fred, thanks! there s no user with id 1. My bad! While destroying a record, is there any easier way (a hook in activerecord) to get warning/error that record belongs to other records (if at all it does)? --~--~-~--~~~---~--~~ You received this message because you

[Rails] ActiveRecord is being converted to Hash unexpectedly

2009-10-24 Thread drewB
I am running into a very odd problem. I have an ActiveRecord called Objective with a public create method. When this method is called in a controller the return value is a Hash instead of Objective. When I test the method in Rspec for the model it returns as Objective. Does anyone have an

[Rails] Re: issue with eager loading in nested routes

2009-10-24 Thread Frederick Cheung
On Oct 24, 4:26 pm, nin_d ninadpachp...@gmail.com wrote: Fred, thanks! there s no user with id 1. My bad! While destroying a record, is there any easier way (a hook in activerecord) to get warning/error that record belongs to other records (if at all it does)? You can set a dependent

[Rails] Re: ActiveRecord is being converted to Hash unexpectedly

2009-10-24 Thread drewB
I should mention that the Hash does contain the Objective's data. the reason it is important that Objective is returned instead of Hash is because I want to be able to call methods on it. On Oct 24, 8:31 am, drewB dbats...@gmail.com wrote: I am running into a very odd problem.  I have an

[Rails] Re: Render or update only one element of a table

2009-10-24 Thread Alexandre Petitjean
Thanks, you send me on the right way. This is how I resolve it thanks to Ajax : - views/home/_car.html.erb tr id='car_' + %= car.id.to_s % % remote_form_for car do |f| % td%= car.name %/td % car.group.checks.each do |c| % td%= text_field_tag 'check_' + c.id.to_s,

[Rails] Re: validates_uniqueness_of across multiple rows?

2009-10-24 Thread Matt Jones
This isn't something that's going to be easy in any ORM, but here's an idea. What about caching a list of the members of a Grouping in an attribute? You'd need to include the type obviously, so it would look something like this: 'bar:1,bar:5,foo:2,frob:14' You'd need to update this field when

[Rails] Multiple user types with Authlogic

2009-10-24 Thread Jake Boxer
After a lot of careful research, I've made the decision to go with Authlogic ( http://github.com/binarylogic/authlogic ) for authentication in my app. I currently have a User model (which acts_as_authentic in Authlogic). However, my app is going to have multiple user types (Teacher, Student, and

[Rails] Re: Google App Engine

2009-10-24 Thread Marnen Laibow-Koser
rails.n...@gmail.com wrote: Heroku seems quite expensive... the $50 Crane recommended for small business apps quickly becomes $158 when you follow their recommended number of Dynos. You could start with one of their lower-end plans (like the free plan!) and see if it will work for you. As

[Rails] Ajax in RoR - observe_field

2009-10-24 Thread Misiek Sz
Hey, I'm trying to achieve something relatively simple and missing something that is probably very simple, which I'm loosing my head over. My situation is the following: I have two tables: -education_plans -students Each student has_one ed_plan and each ed_plan belongs to one student. What I'm

[Rails] Re: Google App Engine

2009-10-24 Thread Marnen Laibow-Koser
rails.n...@gmail.com wrote: With BigTable I think there would be a considerable amount of re- thinking needed to get Rails to use it effectively. From what I've read, Google app engine wont necessarily scale well if you blindly attempt to use it in a similar fashion as relational

[Rails] Re: Has many through

2009-10-24 Thread Marnen Laibow-Koser
Scott Holland wrote: [...]. Ok, so now I have the polymorphic relationship set up and working fine... class Event ActiveRecord::Base has_many :guestlists has_many :notes, :as = :notable end class Guestlist ActiveRecord::Base belongs_to :event has_many :notes, :as =

[Rails] Re: Currency helper

2009-10-24 Thread Marnen Laibow-Koser
RVince wrote: Inputting valid currency amounts in a textbox How about validates_numericality_of ? On Oct 23, 2:25�pm, Marnen Laibow-Koser rails-mailing-l...@andreas- Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Local not passing to partial when validation error

2009-10-24 Thread Dan Sadaka
Sijo k g wrote: Hi Dan Sadaka Is it solved?If not plese paste your controller code Sijo Sijo, I just used a session variable instead. Thanks anyway, Dan -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this

[Rails] Re: saving changes before the user leaves a form page?

2009-10-24 Thread Marnen Laibow-Koser
lunaclaire wrote: hmmm thx, Phillip... I was thinking that there was a rails aspect in that there'd be something tricky in catching the onunload event in JS and then if the user wanted to save, posting back from there to my rails action to handle the saving... no? I guess I'm not

[Rails] Re: Rspec Tutorial

2009-10-24 Thread Marnen Laibow-Koser
Rails ROR wrote: Hi, I have tried in google for Rspec. I thought there might be few books also. There are. But they're not free. Thankyou for your reply. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Ajax in RoR - observe_field

2009-10-24 Thread Leonardo Mateo
On Sat, Oct 24, 2009 at 7:09 PM, Misiek Sz rails-mailing-l...@andreas-s.net wrote: Hey, I'm trying to achieve something relatively simple and missing something that is probably very simple, which I'm loosing my head over. My situation is the following: I have two tables: -education_plans

[Rails] Re: Multiple user types with Authlogic

2009-10-24 Thread Marnen Laibow-Koser
Jake Boxer wrote: After a lot of careful research, I've made the decision to go with Authlogic ( http://github.com/binarylogic/authlogic ) for authentication in my app. I currently have a User model (which acts_as_authentic in Authlogic). However, my app is going to have multiple user

[Rails] Javascript error

2009-10-24 Thread Yulia
Hi, I am doing some stuff with Javascript. It runs fine on my local machine, however, I receive the following error on the deployed copy: Processing PropertiesController#new (for 69.86.211.169 at 2009-10-24 20:43:32) [GET] Rendering template within layouts/data_layout Rendering properties/new

[Rails] Formatter classes, was: Re: Displaying a date 'properly'....

2009-10-24 Thread Marnen Laibow-Koser
Robert Walker wrote: Marnen Laibow-Koser wrote: Or Cocoa is poorly designed in this regard. (And Obj-C is such a weird language that it wouldn't entirely surprise me if there was in fact a language reason for this decision.) So you're saying here that Cocoa MUST be poorly designed, and

[Rails] Nested Attributes For HABTM - Deleting The Right Record

2009-10-24 Thread MaggotChild
In a many-to-many relationship, defined via has_and_belongs_to_many, accepts_nested_attributes_for deletes the wrong record(s) when marked_for_destruction? == true. For example: class Ho AR has_and_belongs_to_many :strolls, :join_table = :ho_strolls accepts_nested_attributes_for :strolls,

[Rails] Formatter classes, was: Re: Displaying a date 'properly'....

2009-10-24 Thread Robert Walker
Marnen Laibow-Koser wrote: * You seemed to be saying that we should use this pattern because Cocoa does. My respose was that yes, that's possible, but it's also possible that Cocoa made a mistake. I make no judgement on which is the case; I merely wanted to point out the other