shyam
2012-Jul-12 18:04 UTC
Re: Digest for rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org - 25 Messages in 7 Topics
Hi all, Join this meetup. Tomorrow 7:00 PM Minerva Coffee House Near Maitrivanam, Ameerpet, Hyderabad http://www.meetup.com/Ruby-on-Rails-Startups/ On Thu, Jul 12, 2012 at 10:58 PM, <rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> wrote:> Today''s Topic Summary > > Group: http://groups.google.com/group/rubyonrails-talk/topics > > - What the Ruby Association <#1387c3c828fe6c75_group_thread_0> [14 > Updates] > - DEMO PROJECT <#1387c3c828fe6c75_group_thread_1> [4 Updates] > - Cure AIDS Now web dev <#1387c3c828fe6c75_group_thread_2> [1 Update] > - railslist.com - an opensource craigslist!<#1387c3c828fe6c75_group_thread_3>[1 Update] > - ceil method <#1387c3c828fe6c75_group_thread_4> [1 Update] > - Run performance tests without dumping database<#1387c3c828fe6c75_group_thread_5>[3 Updates] > - app-prefix for tasks defined in an engine?!<#1387c3c828fe6c75_group_thread_6>[1 Update] > > What the Ruby Association<http://groups.google.com/group/rubyonrails-talk/t/873322cb96f53a35> > > "Jean-Sébastien D." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 04:27PM +0200 > > Hi everyone, > > I just started learning ruby on rails coming from php and mysql worlds. > The tutorial are getting really confusing!!! According to this > http://guides.rubyonrails.org/migrations.html if you want to add > foreign > key to a model it is not possible unless you use SQL format and > explicitly tell it where it is. > > On the other-side, you have this > http://guides.rubyonrails.org/association_basics.html tutorial it is > possible by simply telling which field are related. > > Now which tutorial i am suppose to believe??? Also if the association > together does it return the entire order rows or just one item of it. > and if i look in a db_migrate file why is there no id field already in > the file? Where does it get created? > > Thanks but its a bit confusing coming from other language. > > -- > Posted via http://www.ruby-forum.com/. > > > > > Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> Jul 12 10:35AM -0400 > > On Jul 12, 2012, at 10:27 AM, Jean-Sébastien D. wrote: > > > http://guides.rubyonrails.org/migrations.html if you want to add > foreign > > key to a model it is not possible unless you use SQL format and > > explicitly tell it where it is. > > I think that''s referring to actual DB-enforced foreign key > constraints. ActiveRecord provides a lot of helpful methods in the > associations that basically mimc what a traditional fk would do, but at the > Ruby level. > > > > On the other-side, you have this > > http://guides.rubyonrails.org/association_basics.html tutorial it is > > possible by simply telling which field are related. > > I would follow this until you feel some pain that it doesn''t solve. If > you find that a real fk is the only way, look at the Foreigner gem, which > is an ActiveRecord extension that wraps real DB key constraints. > > > together does it return the entire order rows or just one item of it. > > and if i look in a db_migrate file why is there no id field already > in > > the file? Where does it get created? > > Read carefully through the associations guide. The ActiveRecord > associations are deep and powerful. Also read through the migrations guide. > The id, created_at, and updated_at columns are all "assumed" in any > migration, unless you add some flags to suppress them when making the > migration. > > > > Thanks but its a bit confusing coming from other language. > > But so worth it. I just spent all of yesterday untwisting some PHP I > wrote in 2004. Fun? No, not really. > > Walter > > > > > > "Jean-Sébastien D." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 04:58PM +0200 > > Walter Davis wrote in post #1068445: > > > But so worth it. I just spent all of yesterday untwisting some PHP I > > wrote in 2004. Fun? No, not really. > > > Walter > > > Thanks I appreciate! > > I have one last questions!! > > Because i started recently and not on a production server for what i > am > building. I created rought models with bunch of fields, and did rake > db:migrate. So now they are created but I want to take those field > out. > How should I proceed?? I would like to go into the db/folder find the > model modify it to what i needs exactly then was hoping to do rake > db:migrate to refresh with the newest options, this doesnt seem to > work. > What would be my other option, and there are over 50 model so i > already > try rake db:reset but that didn''t do anything other than resetting my > data. > > -- > Posted via http://www.ruby-forum.com/. > > > > > Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> Jul 12 11:06AM -0400 > > On Jul 12, 2012, at 10:58 AM, Jean-Sébastien D. wrote: > > > What would be my other option, and there are over 50 model so i > already > > try rake db:reset but that didn''t do anything other than resetting > my > > data. > > If you read through the migrations guide, you will learn about rake > db:rollback, which will step backward through your migrations. You can then > hand-edit the migrations, delete the ones that have rolled back and > generate new ones, or some combination of those. Just don''t remove an > already-run migration without rolling it back first. > > Walter > > > > > > "Jean-Sébastien D." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 05:18PM +0200 > > Walter Davis wrote in post #1068451: > > generate new ones, or some combination of those. Just don''t remove an > > already-run migration without rolling it back first. > > > Walter > > Is there a way for me to select one specifically something like this > > rake db:rollback YYYYMMDDHHMMSS_model.rb > > -- > Posted via http://www.ruby-forum.com/. > > > > > Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> Jul 12 05:24PM +0100 > > >> try rake db:reset but that didn''t do anything other than resetting > my > >> data. > > > If you read through the migrations guide, you will learn about rake > db:rollback, which will step backward through your migrations. You can then > hand-edit the migrations, delete the ones that have rolled back and > generate new ones, or some combination of those. Just don''t remove an > already-run migration without rolling it back first. > > That can be done but it is often better to write a new migration to > remove the stuff you have decided you did not need after all. > Rollback is fine if you make a migration, run it, but then realise > that it was a bad idea and want to go back to the previous one and > remove the migration. For any more complex situation I would advise > writing a new migration to undo the previous one instead. Otherwise > it is easy to get confused about the state of the database. > > Also, as well as looking through the guides I suggest working right > through a tutorial such as railstutorial.org, which is free to use > online, to get the basics of Rails. > > Colin > > > > > Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> Jul 12 12:26PM -0400 > > On Jul 12, 2012, at 11:18 AM, Jean-Sébastien D. wrote: > > > >> Walter > > > Is there a way for me to select one specifically something like this > > > rake db:rollback YYYYMMDDHHMMSS_model.rb > > I don''t know specifically -- what do the guides say? I''ve only ever > stepped back one or two at a time, made my adjustments, then run rake > db:migrate again to roll back up to the current stage. > > Walter > > > > > "Jean-Sébastien D." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 06:30PM +0200 > > Walter Davis wrote in post #1068458: > > stepped back one or two at a time, made my adjustments, then run rake > > db:migrate again to roll back up to the current stage. > > > Walter > > Thanks I appreciate, i find it weird that you must make a new > migration > everytime you made a mistake, its seem to be a lot of overhead in > compilation time. Maybe something that future rails should invest. Who > knows I just started learning ruby. > > Thanks > > -- > Posted via http://www.ruby-forum.com/. > > > > > Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> Jul 12 12:37PM -0400 > > On Jul 12, 2012, at 12:30 PM, Jean-Sébastien D. wrote: > > > everytime you made a mistake, its seem to be a lot of overhead in > > compilation time. Maybe something that future rails should invest. > Who > > knows I just started learning ruby. > > The migrations are typically only run during development, and then you > can install from the schema (which maintains a "current state" of the > database at all times) when you get to production. Migrations are a great > way to build an application organically, because you can roll them back and > undo a spike you tried and didn''t like. Use them like Git for your database. > > Walter > > > > > > "Jean-Sébastien D." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 06:37PM +0200 > > Jean-Sébastien D. wrote in post #1068459: > > compilation time. Maybe something that future rails should invest. > Who > > knows I just started learning ruby. > > > Thanks > > One more questions.. > If i have two tables it should be declared has follow to have my > foreign > key > CUSTOMER ORDER > first customer_id > last pay_to > ... ... > > Correct then in the model i should specify the relation ship correct? > > -- > Posted via http://www.ruby-forum.com/. > > > > > Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> Jul 12 05:39PM +0100 > > > everytime you made a mistake, its seem to be a lot of overhead in > > compilation time. Maybe something that future rails should invest. > Who > > knows I just started learning ruby. > > What compilation time? A migration is only loaded and run when you ask > for it. > > Colin > > > > > Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> Jul 12 05:44PM +0100 > > > last pay_to > > ... ... > > > Correct then in the model i should specify the relation ship correct? > > Can you explain the above again, I don''t understand what you are > trying to achieve. Also it is best to talk first about models and > relationships, (has_many, belongs_to and so on) then the table > requirements will follow from that. > > So first tell us what the models are and what the relationships are. > > Colin > > > > > > "Jean-Sébastien D." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 06:56PM +0200 > > Colin Law wrote in post #1068465: > > requirements will follow from that. > > > So first tell us what the models are and what the relationships are. > > > Colin > > Well i am from MySQL world. I am use to a database has follow > > CUSTOMER ORDER > customerID orderID > firstName customerID > lastName price > password proceededAt > emails > > In MySQL you would have has follow: PK customerID, orderID, FK > order(customerID) to customer(customerID) > > In Rails if I understood I create has follow > > CUSTOMER ORDER > first_name price > last_name proceed_at > password > emails > > Now in models I would have to say > > Customer belongs to order > Order has customer > > Now my main questions I understand I dont define customer_id and > order_id in customer and order table because its already assume to > have > an id key when created. But in ORDER model should I define > customer_id:integer and in model say > ORder customer_id: has customer. To let it know that this field is > actually a foreign key? > > -- > Posted via http://www.ruby-forum.com/. > > > > > Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> Jul 12 06:07PM +0100 > > > > Now in models I would have to say > > > Customer belongs to order > > Order has customer > > I think that should be customer has_many orders and order belongs_to > customer. The words make some reasonable sense in english. > > > customer_id:integer and in model say > > ORder customer_id: has customer. To let it know that this field is > > actually a foreign key? > > Since order belongs_to customer then the orders table (note the plural > name for the table) should have a customer_id column. You don''t need > to tell rails that it is a foreign key, it will know that from the > model relationships. To specify it in the migration for orders you > can say (as is mentioned in the migrations guide). > > t.references :customer > or > t.integer :customer_id > > As I think I said previously if you work right through some tutorials > all this should become clear. > > Colin > > > > DEMO PROJECT<http://groups.google.com/group/rubyonrails-talk/t/8fea37c3b48675d7> > > Amardeep Singh <er.amar1911-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Jul 12 04:32PM +0530 > > HELLO > > I need some Demo Project of ROR to practice on it..Plz anyone help me > to > start with ROR. > or send Pdf File With Description. > > > Thanks > > > > > Rick <richard.t.lloyd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Jul 12 05:59AM -0700 > > google rails demo app yields > http://ruby.railstutorial.org/chapters/a-demo-app > > looks like a good place to start > > Rick > > On Thursday, July 12, 2012 7:02:06 AM UTC-4, Amardeep Singh wrote: > > > > > Carlos Eduardo Ribeiro <duduribeiro.gba-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Jul 12 09:32AM > -0300 > > https://github.com/devton/whatismyvideoid > > 2012/7/12 Amardeep Singh <er.amar1911-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > > > > > Dave Aronson <googlegroups2dave-BRiZGj7G2yRXqviUI+FSNg@public.gmane.org> Jul 12 01:04PM -0400 > > > > I need some Demo Project of ROR to practice on it.. > > Do you mean an existing project, so you can practice understanding > what''s already there? There are lots of open source projects that > would be glad to have some help. (Yes you may be a net drain at > first, but as you learn, you''ll surely make real contributions soon. > Just try to find one with patient enough people to help you through > the initial learning curve.) > > Or if you mean an idea for something you can start from scratch as a > project... they''re all around. Find an itch you want to scratch. Is > there some kind of record you want to keep electronically, more > intelligently than a text file or spreadsheet? Like maybe your > recipes, your comic book collection, ballistic results of ammunition > loading experiments, what girls you think are how hot (or boys, > whatever floats your boat), your motorcycle club''s upcoming rides, > etc.? Or maybe you just wish there was some web site that would . . . > do what? Match people up with others near them for all-night high > stakes poker games? Find the nearest restaurant with good reviews > from the top ten sources? Filter your Twitter or Facebook feeds to > weed out the idiots you only followed back because they''re colleagues > to whom you don''t want to reveal what you really think of them? Dream > a dream, then make it happen. To paraphrase a guy you may have heard > of, "Write the web site you wish to see in the world." :-) > > -Dave > > -- > Dave Aronson, Cleared/Remote Ruby on Rails Freelancer > (NoVa/DC/Remote); see www.DaveAronson.com, and blogs at > www.Codosaur.us, www.Dare2XL.com, www.RecruitingRants.com > > > > Cure AIDS Now web dev<http://groups.google.com/group/rubyonrails-talk/t/b12d9bd7ebd6cee6> > > "Joe A." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 07:03PM +0200 > > This particular project is for that of a grander purpose. > > Cure AIDS Now (CAN) Foundation is undergoing clinical trails with > Google.org to release a non-toxic anti viral patch to cost-effectively > suppress HIV. The long term approach includes the solidification of a > $50B bond to distribute cure nebulizers with integrated IP addresses to > be linked with Google satellites. This will lead to the anonymous > identification and tracking of all those who suffer from HIV around the > World. Eventually leading to a meta-moment in which HIV/AIDS is > eradicated from Earth. > > The overall goal is to eliminate the human immunodeficiency virus from > the human genome. > > > ------------------------------------------------------------------------------------------------------------------------ > > This particular gig is to deploy a Craigslist style website > specifically > geared toward the HIV community. The main purpose for this subsidiary > of > the CAN Foundation is to develop a perpetual can goods and fund drive > for the community. > > Basic functionality should include 1) posts by location, 2) anonymously > generated private messaging and 3) event calendar -- exactly similar to > the functionality of Craigslist > > Implementation of this project should be deployed in two phases: > > Phase 1) Deploy RailsList > (https://github.com/railslist/craigslist-clone) > Phase 2) Enhance UI (Desired UI will be created in Photoshop and PSD''s > will be sent over to you) > * Note: basically UI enhancements includes a colored background, > different placement of certain modules, and change in fonts -- pretty > simple enhancements. > > Requirements: > 1) Must be proficient with Ruby on Rails > 2) Must provide your own stage/development hosting server > 3) Must a very quick turnaround (phase 1 within 24 hours). > > Deliverable: > > Final website deployed/migrated onto a dedicated web hosting server. > > > ------------------------------------------------------------------------------------------------------------------------------- > > This project is with Mr. Brando Bronzino - creator of the Rock & Roll > Hall of Fame and Mr. Lynn Luckow - founder of Craigslist.com > > Upon successful completion of this gig, you are entitled to a position > on the Cure AIDS Now Foundation team as chief web master and 5% of > charitable funds. > > Please email Joe.allen-KIdckdy1XcAZofMszxde7g@public.gmane.org for inquiries. > > Best regards, > > Joe > > -- > Posted via http://www.ruby-forum.com/. > > > > railslist.com - an opensource craigslist!<http://groups.google.com/group/rubyonrails-talk/t/df27b9eaa83f62cf> > > "Joe A." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 06:55PM +0200 > > This particular project is for that of a grander purpose. > > Cure AIDS Now (CAN) Foundation is undergoing clinical trails with > Google.org to release a non-toxic anti viral patch to cost-effectively > suppress HIV. The long term approach includes the solidification of a > $50B bond to distribute cure nebulizers with integrated IP addresses to > be linked with Google satellites. This will lead to the anonymous > identification and tracking of all those who suffer from HIV around the > World. Eventually leading to a meta-moment in which HIV/AIDS is > eradicated from Earth. > > The overall goal is to eliminate the human immunodeficiency virus from > the human genome. > > > ------------------------------------------------------------------------------------------------------------------------ > > This particular gig is to deploy a Craigslist style website > specifically > geared toward the HIV community. The main purpose for this subsidiary > of > the CAN Foundation is to develop a perpetual can goods and fund drive > for the community. > > Basic functionality should include 1) posts by location, 2) anonymously > generated private messaging and 3) event calendar -- exactly similar to > the functionality of Craigslist > > Implementation of this project should be deployed in two phases: > > Phase 1) Deploy RailsList > (https://github.com/railslist/craigslist-clone) > Phase 2) Enhance UI (Desired UI will be created in Photoshop and PSD''s > will be sent over to you) > * Note: basically UI enhancements includes a colored background, > different placement of certain modules, and change in fonts -- pretty > simple enhancements. > > Requirements: > 1) Must be proficient with Ruby on Rails > 2) Must provide your own stage/development hosting server > 3) Must a very quick turnaround (phase 1 within 24 hours). > > Deliverable: > > Final website deployed/migrated onto a dedicated web hosting server. > > > ------------------------------------------------------------------------------------------------------------------------------- > > This project is with Mr. Brando Bronzino - creator of the Rock & Roll > Hall of Fame and Mr. Lynn Luckow - founder of Craigslist.com > > Upon successful completion of this gig, you are entitled to a position > on the Cure AIDS Now Foundation team as chief web master and 5% of > charitable funds. > > -- > Posted via http://www.ruby-forum.com/. > > > > ceil method<http://groups.google.com/group/rubyonrails-talk/t/c7641646c25e42d4> > > Dave Aronson <googlegroups2dave-BRiZGj7G2yRXqviUI+FSNg@public.gmane.org> Jul 12 12:45PM -0400 > > > > So if size returns 2, then the above expression returns 1. > > > Here''s my question. In terms of arithmetic, I dont understand why > 3.0 must > > be used and not just 3. > > To clarify (and expand, thus re-muddying) the preceding answers > somewhat: > > If a mathematical expression is written with only integers, most > languages will assume that you want an integer answer. How it will > deal with the remainder may vary, such as rounding, truncation, or > "banker''s rounding". (IIRC VB or some such thing uses that. The > difference from normal rounding is that normally halves round up, > while in banker''s rounding, halves round to whichever way gives an > even number.) > > So, you use .0 to turn one of those integers into a floating point > number. > > You can achieve the same thing with a multiplication by 1.0. You''ll > see this used where the numbers are variables rather than literals, > especially in languages that make you declare a variable''s type, and > distinguish between integers and floating point numbers. > > Either way, in a complicated expression, you may need to be careful > about *which* literal you tack .0 onto, or *when* you multiply by 1.0. > Getting that wrong may wind up with some deeper parts of the > expression yielding integer results, when you really wanted a float. > > -Dave > > -- > Dave Aronson, Cleared/Remote Ruby on Rails Freelancer > (NoVa/DC/Remote); see www.DaveAronson.com, and blogs at > www.Codosaur.us, www.Dare2XL.com, www.RecruitingRants.com > > > > Run performance tests without dumping database<http://groups.google.com/group/rubyonrails-talk/t/4be178d18ac277ae> > > Andy Chambers <achambers.home-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Jul 12 07:37AM -0700 > > On Thursday, July 12, 2012 3:03:25 AM UTC-4, Colin Law wrote: > > > work well on millions of rows. > > > The test environment is designed for testing that stuff works, not > for > > performance testing. > > > If this is true, someone should tell that to the official guide > maintainers > > http://guides.rubyonrails.org/performance_testing.html > > The test environment is not appropriate for performance testing > > anyway, to do this you would have to set up a parallel production > > environment in order that it correctly mimics your real environment. > > Exactly! We have this. I just wondered if there was a "rails/ruby way" > of > writing and running performance tests against this environment. The > scaffolding builds a tests/performance directory so I assumed there > was. > > > > > Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> Jul 12 05:01PM +0100 > > >> performance testing. > > > If this is true, someone should tell that to the official guide > maintainers > > > http://guides.rubyonrails.org/performance_testing.html > > That munching sound you can hear is me eating my words. > > > > Exactly! We have this. I just wondered if there was a "rails/ruby > way" of > > writing and running performance tests against this environment. The > > scaffolding builds a tests/performance directory so I assumed there > was. > > I see from the guide section 1.7 that for performance test environment > is close to the production environment. Munch munch. > > So to get back to your original question this might be helpful, though > I have not tried it myself. It is a bit old so may need tweaking for > Rails 3. Does anyone else have suggestions? > http://m.onkey.org/running-rails-performance-tests-on-real-data > > Colin > > > > > Andy Chambers <achambers.home-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Jul 12 09:31AM -0700 > > On Thursday, July 12, 2012 12:01:15 PM UTC-4, Colin Law wrote: > > I have not tried it myself. It is a bit old so may need tweaking for > > Rails 3. Does anyone else have suggestions? > > http://m.onkey.org/running-rails-performance-tests-on-real-data > > Aha, thanks for this link. That helps a lot. > > > > app-prefix for tasks defined in an engine?!<http://groups.google.com/group/rubyonrails-talk/t/3ea093a1f4544ab3> > > "vierundsechzig-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org" <vierundsechzig-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> Jul 12 > 07:52AM -0700 > > I have defined a rake task inside an engine like this: > > rake app:redmine_config:spec > > namespace :my_engine do > > desc "say foo" > task :foo do > puts "foo from the engine" > end > > end > > I expected the task to be available under > > rake my_engine:foo > > instead I found it under: > > rake app:my_engine:foo > > Does anybody have an idea where the prefix comes from? Can I change > it? Can > I get rid of it? > > thx for any help, > stefan > > > > You received this message because you are subscribed to the Google Group > rubyonrails-talk. > You can post via email <rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>. > To unsubscribe from this group, send<rubyonrails-talk+unsubscribe@googlegroups.com>an empty message. > For more options, visit<http://groups.google.com/group/rubyonrails-talk/topics>this group. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en-US. >-- Thanks & Regards, - Shyam -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.
hanish jadala
2012-Jul-13 05:48 UTC
Re: Digest for rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org - 25 Messages in 7 Topics
Hi all, its good way to start and meet all the guys who are into ROR. On Thu, Jul 12, 2012 at 11:34 PM, shyam <shyammohankanojia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all, > > Join this meetup. > > Tomorrow 7:00 PM > Minerva Coffee House > Near Maitrivanam, Ameerpet, Hyderabad > http://www.meetup.com/Ruby-on-Rails-Startups/ > > On Thu, Jul 12, 2012 at 10:58 PM, <rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>wrote: > >> Today''s Topic Summary >> >> Group: http://groups.google.com/group/rubyonrails-talk/topics >> >> - What the Ruby Association<#1387c5df1ecaa1ab_1387c3c828fe6c75_group_thread_0>[14 Updates] >> - DEMO PROJECT <#1387c5df1ecaa1ab_1387c3c828fe6c75_group_thread_1> [4 >> Updates] >> - Cure AIDS Now web dev<#1387c5df1ecaa1ab_1387c3c828fe6c75_group_thread_2>[1 Update] >> - railslist.com - an opensource craigslist!<#1387c5df1ecaa1ab_1387c3c828fe6c75_group_thread_3>[1 Update] >> - ceil method <#1387c5df1ecaa1ab_1387c3c828fe6c75_group_thread_4> [1 >> Update] >> - Run performance tests without dumping database<#1387c5df1ecaa1ab_1387c3c828fe6c75_group_thread_5>[3 Updates] >> - app-prefix for tasks defined in an engine?!<#1387c5df1ecaa1ab_1387c3c828fe6c75_group_thread_6>[1 Update] >> >> What the Ruby Association<http://groups.google.com/group/rubyonrails-talk/t/873322cb96f53a35> >> >> "Jean-Sébastien D." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 04:27PM +0200 >> >> Hi everyone, >> >> I just started learning ruby on rails coming from php and mysql >> worlds. >> The tutorial are getting really confusing!!! According to this >> http://guides.rubyonrails.org/migrations.html if you want to add >> foreign >> key to a model it is not possible unless you use SQL format and >> explicitly tell it where it is. >> >> On the other-side, you have this >> http://guides.rubyonrails.org/association_basics.html tutorial it is >> possible by simply telling which field are related. >> >> Now which tutorial i am suppose to believe??? Also if the association >> together does it return the entire order rows or just one item of it. >> and if i look in a db_migrate file why is there no id field already in >> the file? Where does it get created? >> >> Thanks but its a bit confusing coming from other language. >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> >> >> >> Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> Jul 12 10:35AM -0400 >> >> On Jul 12, 2012, at 10:27 AM, Jean-Sébastien D. wrote: >> >> > http://guides.rubyonrails.org/migrations.html if you want to add >> foreign >> > key to a model it is not possible unless you use SQL format and >> > explicitly tell it where it is. >> >> I think that''s referring to actual DB-enforced foreign key >> constraints. ActiveRecord provides a lot of helpful methods in the >> associations that basically mimc what a traditional fk would do, but at the >> Ruby level. >> >> >> > On the other-side, you have this >> > http://guides.rubyonrails.org/association_basics.html tutorial it is >> > possible by simply telling which field are related. >> >> I would follow this until you feel some pain that it doesn''t solve. >> If you find that a real fk is the only way, look at the Foreigner gem, >> which is an ActiveRecord extension that wraps real DB key constraints. >> >> > together does it return the entire order rows or just one item of >> it. >> > and if i look in a db_migrate file why is there no id field already >> in >> > the file? Where does it get created? >> >> Read carefully through the associations guide. The ActiveRecord >> associations are deep and powerful. Also read through the migrations guide. >> The id, created_at, and updated_at columns are all "assumed" in any >> migration, unless you add some flags to suppress them when making the >> migration. >> >> >> > Thanks but its a bit confusing coming from other language. >> >> But so worth it. I just spent all of yesterday untwisting some PHP I >> wrote in 2004. Fun? No, not really. >> >> Walter >> >> >> >> >> >> "Jean-Sébastien D." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 04:58PM +0200 >> >> Walter Davis wrote in post #1068445: >> >> > But so worth it. I just spent all of yesterday untwisting some PHP I >> > wrote in 2004. Fun? No, not really. >> >> > Walter >> >> >> Thanks I appreciate! >> >> I have one last questions!! >> >> Because i started recently and not on a production server for what i >> am >> building. I created rought models with bunch of fields, and did rake >> db:migrate. So now they are created but I want to take those field >> out. >> How should I proceed?? I would like to go into the db/folder find the >> model modify it to what i needs exactly then was hoping to do rake >> db:migrate to refresh with the newest options, this doesnt seem to >> work. >> What would be my other option, and there are over 50 model so i >> already >> try rake db:reset but that didn''t do anything other than resetting my >> data. >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> >> >> >> Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> Jul 12 11:06AM -0400 >> >> On Jul 12, 2012, at 10:58 AM, Jean-Sébastien D. wrote: >> >> > What would be my other option, and there are over 50 model so i >> already >> > try rake db:reset but that didn''t do anything other than resetting >> my >> > data. >> >> If you read through the migrations guide, you will learn about rake >> db:rollback, which will step backward through your migrations. You can then >> hand-edit the migrations, delete the ones that have rolled back and >> generate new ones, or some combination of those. Just don''t remove an >> already-run migration without rolling it back first. >> >> Walter >> >> >> >> >> >> "Jean-Sébastien D." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 05:18PM +0200 >> >> Walter Davis wrote in post #1068451: >> > generate new ones, or some combination of those. Just don''t remove >> an >> > already-run migration without rolling it back first. >> >> > Walter >> >> Is there a way for me to select one specifically something like this >> >> rake db:rollback YYYYMMDDHHMMSS_model.rb >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> >> >> >> Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> Jul 12 05:24PM +0100 >> >> >> try rake db:reset but that didn''t do anything other than resetting >> my >> >> data. >> >> > If you read through the migrations guide, you will learn about rake >> db:rollback, which will step backward through your migrations. You can then >> hand-edit the migrations, delete the ones that have rolled back and >> generate new ones, or some combination of those. Just don''t remove an >> already-run migration without rolling it back first. >> >> That can be done but it is often better to write a new migration to >> remove the stuff you have decided you did not need after all. >> Rollback is fine if you make a migration, run it, but then realise >> that it was a bad idea and want to go back to the previous one and >> remove the migration. For any more complex situation I would advise >> writing a new migration to undo the previous one instead. Otherwise >> it is easy to get confused about the state of the database. >> >> Also, as well as looking through the guides I suggest working right >> through a tutorial such as railstutorial.org, which is free to use >> online, to get the basics of Rails. >> >> Colin >> >> >> >> >> Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> Jul 12 12:26PM -0400 >> >> On Jul 12, 2012, at 11:18 AM, Jean-Sébastien D. wrote: >> >> >> >> Walter >> >> > Is there a way for me to select one specifically something like this >> >> > rake db:rollback YYYYMMDDHHMMSS_model.rb >> >> I don''t know specifically -- what do the guides say? I''ve only ever >> stepped back one or two at a time, made my adjustments, then run rake >> db:migrate again to roll back up to the current stage. >> >> Walter >> >> >> >> >> "Jean-Sébastien D." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 06:30PM +0200 >> >> Walter Davis wrote in post #1068458: >> > stepped back one or two at a time, made my adjustments, then run >> rake >> > db:migrate again to roll back up to the current stage. >> >> > Walter >> >> Thanks I appreciate, i find it weird that you must make a new >> migration >> everytime you made a mistake, its seem to be a lot of overhead in >> compilation time. Maybe something that future rails should invest. >> Who >> knows I just started learning ruby. >> >> Thanks >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> >> >> >> Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> Jul 12 12:37PM -0400 >> >> On Jul 12, 2012, at 12:30 PM, Jean-Sébastien D. wrote: >> >> > everytime you made a mistake, its seem to be a lot of overhead in >> > compilation time. Maybe something that future rails should invest. >> Who >> > knows I just started learning ruby. >> >> The migrations are typically only run during development, and then >> you can install from the schema (which maintains a "current state" of the >> database at all times) when you get to production. Migrations are a great >> way to build an application organically, because you can roll them back and >> undo a spike you tried and didn''t like. Use them like Git for your database. >> >> Walter >> >> >> >> >> >> "Jean-Sébastien D." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 06:37PM +0200 >> >> Jean-Sébastien D. wrote in post #1068459: >> > compilation time. Maybe something that future rails should invest. >> Who >> > knows I just started learning ruby. >> >> > Thanks >> >> One more questions.. >> If i have two tables it should be declared has follow to have my >> foreign >> key >> CUSTOMER ORDER >> first customer_id >> last pay_to >> ... ... >> >> Correct then in the model i should specify the relation ship correct? >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> >> >> >> Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> Jul 12 05:39PM +0100 >> >> > everytime you made a mistake, its seem to be a lot of overhead in >> > compilation time. Maybe something that future rails should invest. >> Who >> > knows I just started learning ruby. >> >> What compilation time? A migration is only loaded and run when you >> ask for it. >> >> Colin >> >> >> >> >> Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> Jul 12 05:44PM +0100 >> >> > last pay_to >> > ... ... >> >> > Correct then in the model i should specify the relation ship >> correct? >> >> Can you explain the above again, I don''t understand what you are >> trying to achieve. Also it is best to talk first about models and >> relationships, (has_many, belongs_to and so on) then the table >> requirements will follow from that. >> >> So first tell us what the models are and what the relationships are. >> >> Colin >> >> >> >> >> >> "Jean-Sébastien D." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 06:56PM +0200 >> >> Colin Law wrote in post #1068465: >> > requirements will follow from that. >> >> > So first tell us what the models are and what the relationships are. >> >> > Colin >> >> Well i am from MySQL world. I am use to a database has follow >> >> CUSTOMER ORDER >> customerID orderID >> firstName customerID >> lastName price >> password proceededAt >> emails >> >> In MySQL you would have has follow: PK customerID, orderID, FK >> order(customerID) to customer(customerID) >> >> In Rails if I understood I create has follow >> >> CUSTOMER ORDER >> first_name price >> last_name proceed_at >> password >> emails >> >> Now in models I would have to say >> >> Customer belongs to order >> Order has customer >> >> Now my main questions I understand I dont define customer_id and >> order_id in customer and order table because its already assume to >> have >> an id key when created. But in ORDER model should I define >> customer_id:integer and in model say >> ORder customer_id: has customer. To let it know that this field is >> actually a foreign key? >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> >> >> >> Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> Jul 12 06:07PM +0100 >> >> >> > Now in models I would have to say >> >> > Customer belongs to order >> > Order has customer >> >> I think that should be customer has_many orders and order belongs_to >> customer. The words make some reasonable sense in english. >> >> > customer_id:integer and in model say >> > ORder customer_id: has customer. To let it know that this field is >> > actually a foreign key? >> >> Since order belongs_to customer then the orders table (note the plural >> name for the table) should have a customer_id column. You don''t need >> to tell rails that it is a foreign key, it will know that from the >> model relationships. To specify it in the migration for orders you >> can say (as is mentioned in the migrations guide). >> >> t.references :customer >> or >> t.integer :customer_id >> >> As I think I said previously if you work right through some tutorials >> all this should become clear. >> >> Colin >> >> >> >> DEMO PROJECT<http://groups.google.com/group/rubyonrails-talk/t/8fea37c3b48675d7> >> >> Amardeep Singh <er.amar1911-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Jul 12 04:32PM +0530 >> >> HELLO >> >> I need some Demo Project of ROR to practice on it..Plz anyone help me >> to >> start with ROR. >> or send Pdf File With Description. >> >> >> Thanks >> >> >> >> >> Rick <richard.t.lloyd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Jul 12 05:59AM -0700 >> >> google rails demo app yields >> http://ruby.railstutorial.org/chapters/a-demo-app >> >> looks like a good place to start >> >> Rick >> >> On Thursday, July 12, 2012 7:02:06 AM UTC-4, Amardeep Singh wrote: >> >> >> >> >> Carlos Eduardo Ribeiro <duduribeiro.gba-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Jul 12 09:32AM >> -0300 >> >> https://github.com/devton/whatismyvideoid >> >> 2012/7/12 Amardeep Singh <er.amar1911-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> >> >> >> >> >> Dave Aronson <googlegroups2dave-BRiZGj7G2yRXqviUI+FSNg@public.gmane.org> Jul 12 01:04PM -0400 >> >> >> >> > I need some Demo Project of ROR to practice on it.. >> >> Do you mean an existing project, so you can practice understanding >> what''s already there? There are lots of open source projects that >> would be glad to have some help. (Yes you may be a net drain at >> first, but as you learn, you''ll surely make real contributions soon. >> Just try to find one with patient enough people to help you through >> the initial learning curve.) >> >> Or if you mean an idea for something you can start from scratch as a >> project... they''re all around. Find an itch you want to scratch. Is >> there some kind of record you want to keep electronically, more >> intelligently than a text file or spreadsheet? Like maybe your >> recipes, your comic book collection, ballistic results of ammunition >> loading experiments, what girls you think are how hot (or boys, >> whatever floats your boat), your motorcycle club''s upcoming rides, >> etc.? Or maybe you just wish there was some web site that would . . . >> do what? Match people up with others near them for all-night high >> stakes poker games? Find the nearest restaurant with good reviews >> from the top ten sources? Filter your Twitter or Facebook feeds to >> weed out the idiots you only followed back because they''re colleagues >> to whom you don''t want to reveal what you really think of them? Dream >> a dream, then make it happen. To paraphrase a guy you may have heard >> of, "Write the web site you wish to see in the world." :-) >> >> -Dave >> >> -- >> Dave Aronson, Cleared/Remote Ruby on Rails Freelancer >> (NoVa/DC/Remote); see www.DaveAronson.com, and blogs at >> www.Codosaur.us, www.Dare2XL.com, www.RecruitingRants.com >> >> >> >> Cure AIDS Now web dev<http://groups.google.com/group/rubyonrails-talk/t/b12d9bd7ebd6cee6> >> >> "Joe A." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 07:03PM +0200 >> >> This particular project is for that of a grander purpose. >> >> Cure AIDS Now (CAN) Foundation is undergoing clinical trails with >> Google.org to release a non-toxic anti viral patch to cost-effectively >> suppress HIV. The long term approach includes the solidification of a >> $50B bond to distribute cure nebulizers with integrated IP addresses >> to >> be linked with Google satellites. This will lead to the anonymous >> identification and tracking of all those who suffer from HIV around >> the >> World. Eventually leading to a meta-moment in which HIV/AIDS is >> eradicated from Earth. >> >> The overall goal is to eliminate the human immunodeficiency virus from >> the human genome. >> >> >> ------------------------------------------------------------------------------------------------------------------------ >> >> This particular gig is to deploy a Craigslist style website >> specifically >> geared toward the HIV community. The main purpose for this subsidiary >> of >> the CAN Foundation is to develop a perpetual can goods and fund drive >> for the community. >> >> Basic functionality should include 1) posts by location, 2) >> anonymously >> generated private messaging and 3) event calendar -- exactly similar >> to >> the functionality of Craigslist >> >> Implementation of this project should be deployed in two phases: >> >> Phase 1) Deploy RailsList >> (https://github.com/railslist/craigslist-clone) >> Phase 2) Enhance UI (Desired UI will be created in Photoshop and PSD''s >> will be sent over to you) >> * Note: basically UI enhancements includes a colored background, >> different placement of certain modules, and change in fonts -- pretty >> simple enhancements. >> >> Requirements: >> 1) Must be proficient with Ruby on Rails >> 2) Must provide your own stage/development hosting server >> 3) Must a very quick turnaround (phase 1 within 24 hours). >> >> Deliverable: >> >> Final website deployed/migrated onto a dedicated web hosting server. >> >> >> ------------------------------------------------------------------------------------------------------------------------------- >> >> This project is with Mr. Brando Bronzino - creator of the Rock & Roll >> Hall of Fame and Mr. Lynn Luckow - founder of Craigslist.com >> >> Upon successful completion of this gig, you are entitled to a position >> on the Cure AIDS Now Foundation team as chief web master and 5% of >> charitable funds. >> >> Please email Joe.allen-KIdckdy1XcAZofMszxde7g@public.gmane.org for inquiries. >> >> Best regards, >> >> Joe >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> >> >> railslist.com - an opensource craigslist!<http://groups.google.com/group/rubyonrails-talk/t/df27b9eaa83f62cf> >> >> "Joe A." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Jul 12 06:55PM +0200 >> >> This particular project is for that of a grander purpose. >> >> Cure AIDS Now (CAN) Foundation is undergoing clinical trails with >> Google.org to release a non-toxic anti viral patch to cost-effectively >> suppress HIV. The long term approach includes the solidification of a >> $50B bond to distribute cure nebulizers with integrated IP addresses >> to >> be linked with Google satellites. This will lead to the anonymous >> identification and tracking of all those who suffer from HIV around >> the >> World. Eventually leading to a meta-moment in which HIV/AIDS is >> eradicated from Earth. >> >> The overall goal is to eliminate the human immunodeficiency virus from >> the human genome. >> >> >> ------------------------------------------------------------------------------------------------------------------------ >> >> This particular gig is to deploy a Craigslist style website >> specifically >> geared toward the HIV community. The main purpose for this subsidiary >> of >> the CAN Foundation is to develop a perpetual can goods and fund drive >> for the community. >> >> Basic functionality should include 1) posts by location, 2) >> anonymously >> generated private messaging and 3) event calendar -- exactly similar >> to >> the functionality of Craigslist >> >> Implementation of this project should be deployed in two phases: >> >> Phase 1) Deploy RailsList >> (https://github.com/railslist/craigslist-clone) >> Phase 2) Enhance UI (Desired UI will be created in Photoshop and PSD''s >> will be sent over to you) >> * Note: basically UI enhancements includes a colored background, >> different placement of certain modules, and change in fonts -- pretty >> simple enhancements. >> >> Requirements: >> 1) Must be proficient with Ruby on Rails >> 2) Must provide your own stage/development hosting server >> 3) Must a very quick turnaround (phase 1 within 24 hours). >> >> Deliverable: >> >> Final website deployed/migrated onto a dedicated web hosting server. >> >> >> ------------------------------------------------------------------------------------------------------------------------------- >> >> This project is with Mr. Brando Bronzino - creator of the Rock & Roll >> Hall of Fame and Mr. Lynn Luckow - founder of Craigslist.com >> >> Upon successful completion of this gig, you are entitled to a position >> on the Cure AIDS Now Foundation team as chief web master and 5% of >> charitable funds. >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> >> >> ceil method<http://groups.google.com/group/rubyonrails-talk/t/c7641646c25e42d4> >> >> Dave Aronson <googlegroups2dave-BRiZGj7G2yRXqviUI+FSNg@public.gmane.org> Jul 12 12:45PM -0400 >> >> >> >> > So if size returns 2, then the above expression returns 1. >> >> > Here''s my question. In terms of arithmetic, I dont understand why >> 3.0 must >> > be used and not just 3. >> >> To clarify (and expand, thus re-muddying) the preceding answers >> somewhat: >> >> If a mathematical expression is written with only integers, most >> languages will assume that you want an integer answer. How it will >> deal with the remainder may vary, such as rounding, truncation, or >> "banker''s rounding". (IIRC VB or some such thing uses that. The >> difference from normal rounding is that normally halves round up, >> while in banker''s rounding, halves round to whichever way gives an >> even number.) >> >> So, you use .0 to turn one of those integers into a floating point >> number. >> >> You can achieve the same thing with a multiplication by 1.0. You''ll >> see this used where the numbers are variables rather than literals, >> especially in languages that make you declare a variable''s type, and >> distinguish between integers and floating point numbers. >> >> Either way, in a complicated expression, you may need to be careful >> about *which* literal you tack .0 onto, or *when* you multiply by 1.0. >> Getting that wrong may wind up with some deeper parts of the >> expression yielding integer results, when you really wanted a float. >> >> -Dave >> >> -- >> Dave Aronson, Cleared/Remote Ruby on Rails Freelancer >> (NoVa/DC/Remote); see www.DaveAronson.com, and blogs at >> www.Codosaur.us, www.Dare2XL.com, www.RecruitingRants.com >> >> >> >> Run performance tests without dumping database<http://groups.google.com/group/rubyonrails-talk/t/4be178d18ac277ae> >> >> Andy Chambers <achambers.home-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Jul 12 07:37AM -0700 >> >> On Thursday, July 12, 2012 3:03:25 AM UTC-4, Colin Law wrote: >> > > work well on millions of rows. >> >> > The test environment is designed for testing that stuff works, not >> for >> > performance testing. >> >> >> If this is true, someone should tell that to the official guide >> maintainers >> >> http://guides.rubyonrails.org/performance_testing.html >> >> The test environment is not appropriate for performance testing >> > anyway, to do this you would have to set up a parallel production >> > environment in order that it correctly mimics your real >> environment. >> >> Exactly! We have this. I just wondered if there was a "rails/ruby >> way" of >> writing and running performance tests against this environment. The >> scaffolding builds a tests/performance directory so I assumed there >> was. >> >> >> >> >> Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> Jul 12 05:01PM +0100 >> >> >> performance testing. >> >> > If this is true, someone should tell that to the official guide >> maintainers >> >> > http://guides.rubyonrails.org/performance_testing.html >> >> That munching sound you can hear is me eating my words. >> >> >> > Exactly! We have this. I just wondered if there was a "rails/ruby >> way" of >> > writing and running performance tests against this environment. The >> > scaffolding builds a tests/performance directory so I assumed there >> was. >> >> I see from the guide section 1.7 that for performance test environment >> is close to the production environment. Munch munch. >> >> So to get back to your original question this might be helpful, though >> I have not tried it myself. It is a bit old so may need tweaking for >> Rails 3. Does anyone else have suggestions? >> http://m.onkey.org/running-rails-performance-tests-on-real-data >> >> Colin >> >> >> >> >> Andy Chambers <achambers.home-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Jul 12 09:31AM -0700 >> >> On Thursday, July 12, 2012 12:01:15 PM UTC-4, Colin Law wrote: >> > I have not tried it myself. It is a bit old so may need tweaking >> for >> > Rails 3. Does anyone else have suggestions? >> > http://m.onkey.org/running-rails-performance-tests-on-real-data >> >> Aha, thanks for this link. That helps a lot. >> >> >> >> app-prefix for tasks defined in an engine?!<http://groups.google.com/group/rubyonrails-talk/t/3ea093a1f4544ab3> >> >> "vierundsechzig-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org" <vierundsechzig-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> Jul >> 12 07:52AM -0700 >> >> I have defined a rake task inside an engine like this: >> >> rake app:redmine_config:spec >> >> namespace :my_engine do >> >> desc "say foo" >> task :foo do >> puts "foo from the engine" >> end >> >> end >> >> I expected the task to be available under >> >> rake my_engine:foo >> >> instead I found it under: >> >> rake app:my_engine:foo >> >> Does anybody have an idea where the prefix comes from? Can I change >> it? Can >> I get rid of it? >> >> thx for any help, >> stefan >> >> >> >> You received this message because you are subscribed to the Google >> Group rubyonrails-talk. >> You can post via email <rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>. >> To unsubscribe from this group, send<rubyonrails-talk+unsubscribe@googlegroups.com>an empty message. >> For more options, visit<http://groups.google.com/group/rubyonrails-talk/topics>this group. >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en-US. >> > > > > -- > Thanks & Regards, > - Shyam > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en-US. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.