From swp at mho.com Tue Dec 2 19:41:21 2008 From: swp at mho.com (Scott Peterson) Date: Tue, 2 Dec 2008 17:41:21 -0700 Subject: [Instantrails-users] Trouble getting started with IR 2.0 Message-ID: <187EF4C4766E4B40870376B7415C535B@DimensionE510> I've unzipped the file and the cookbook and typo apps seem to work just great. So, I went and tried 'rails fwci' (don't worry, the name means something to me). Unfortunately, this will not start from IR. When I attempt to start it with Mongrel, the window shuts down after a second or two. I don't see anything logged, or don't know where to look, to try to resolve this. I've read the FAQ and 'Getting started' wiki, but didn't see anything to give me a hint. Thank you, Scott Peterson P.S. I read something in the getting started wiki about trying to reset the default to mysql instead of sqlite3, but didn't understand. Can anyone add some detail? -------------- next part -------------- An HTML attachment was scrubbed... URL: From johnnymeek at yahoo.com Mon Dec 8 02:10:59 2008 From: johnnymeek at yahoo.com (Johnny Meek) Date: Sun, 7 Dec 2008 23:10:59 -0800 (PST) Subject: [Instantrails-users] New User having some difficulties Message-ID: <834756.31783.qm@web50906.mail.re2.yahoo.com> This is my first experience with InstantRails and RoR. I am running InstantRails on a Vista platform for educational / development use only. I am using a mySQL database. Note that I created the database and tables and populated the tables from a mysql command prompt - if that is relevant. In my database, I have a table named equipments. When I try to execute a query against it in a controller method - as basic as @var = Equipment.find(1) - I get an error message as follows: ActiveRecord::StatementInvalid - Table 'cars_development.equipment' doesn't exist. It appears that Rails is looking for a table named equipment rather than equipments. ?? The model for this table is very simple: class Equipment < ActiveRecord::Base has_many :corvettes_equipments end Attempts I have made to correct the problem are: delete and re-create the models, drop and re-create the table, drop and re-create the database, created a new RoR project and copied the views, models and controller from the old project. None of this has worked for me. I finally tried creating a new table using a different name and this worked. As far as I know, I followed the same steps for this new table and model as I followed for the old one. This project is for a class, and I really need to use the table name that matches the assignment specs. The project will be graded using a database that my instructor builds and I can't exactly ask him to make a new table just to comply with my project's design. Thank you in advance for your response, Johnny Meek From opencampground at earthlink.net Mon Dec 8 10:55:22 2008 From: opencampground at earthlink.net (Norm Scherer) Date: Mon, 08 Dec 2008 08:55:22 -0700 Subject: [Instantrails-users] New User having some difficulties In-Reply-To: <834756.31783.qm@web50906.mail.re2.yahoo.com> References: <834756.31783.qm@web50906.mail.re2.yahoo.com> Message-ID: <493D436A.4080300@earthlink.net> I think you are running into a problem where ROR and English meet. In the Rails convention the tables are plural and the model names are singular. Equipment is a collective noun and in itself you might consider it plural. The real plural of it is equipments and the system expects the table to be that name. The best approach in a case like this is to try to think of a name you could use that would be less ambiguous (something that has a simple plural). From opencampground at earthlink.net Mon Dec 8 11:02:16 2008 From: opencampground at earthlink.net (Norm Scherer) Date: Mon, 08 Dec 2008 09:02:16 -0700 Subject: [Instantrails-users] New User having some difficulties In-Reply-To: <834756.31783.qm@web50906.mail.re2.yahoo.com> References: <834756.31783.qm@web50906.mail.re2.yahoo.com> Message-ID: <493D4508.4000505@earthlink.net> Johnny Meek wrote: > This is my first experience with InstantRails and RoR. I am running InstantRails on a Vista platform for educational / development use only. I am using a mySQL database. Note that I created the database and tables and populated the tables from a mysql command prompt - if that is relevant. > > In my database, I have a table named equipments. When I try to execute a query against it in a controller method - as basic as @var = Equipment.find(1) - I get an error message as follows: ActiveRecord::StatementInvalid - Table 'cars_development.equipment' doesn't exist. > > It appears that Rails is looking for a table named equipment rather than equipments. ?? The model for this table is very simple: > > class Equipment < ActiveRecord::Base > has_many :corvettes_equipments > end > > Attempts I have made to correct the problem are: delete and re-create the models, drop and re-create the table, drop and re-create the database, created a new RoR project and copied the views, models and controller from the old project. None of this has worked for me. > > I finally tried creating a new table using a different name and this worked. As far as I know, I followed the same steps for this new table and model as I followed for the old one. > > This project is for a class, and I really need to use the table name that matches the assignment specs. The project will be graded using a database that my instructor builds and I can't exactly ask him to make a new table just to comply with my project's design. > > Thank you in advance for your response, > Johnny Meek > > > > > _______________________________________________ > Instantrails-users mailing list > Instantrails-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/instantrails-users > > Rails is opinionated. It works best when you follow the conventions. If you want to use rails it works best to go along with the program. There is an option in the model definition to use another name. in model/equipment.rb class Equipment < ActiveRecord::Base set_table_name "equipment" ... end -------------- next part -------------- An HTML attachment was scrubbed... URL: From snajang at hotmail.com Tue Dec 16 14:42:30 2008 From: snajang at hotmail.com (S Ajang) Date: Tue, 16 Dec 2008 19:42:30 +0000 Subject: [Instantrails-users] Can't Start MySQL via Instant Rails Console Message-ID: The following error is displayed in Instant Rails Console: MySQL port (3306) is used by "" (mysqld-nt.exe)! Any suggestions??? Thank you. _________________________________________________________________ Send e-mail faster without improving your typing skills. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008 -------------- next part -------------- An HTML attachment was scrubbed... URL: From rbazinet at gmail.com Tue Dec 16 15:01:18 2008 From: rbazinet at gmail.com (Robert Bazinet) Date: Tue, 16 Dec 2008 15:01:18 -0500 Subject: [Instantrails-users] Can't Start MySQL via Instant Rails Console In-Reply-To: References: Message-ID: MySQL is already running, either from InstantRails or you have it installed on your system. -Rob Bazinet On Tue, Dec 16, 2008 at 2:42 PM, S Ajang wrote: > The following error is displayed in Instant Rails Console: > > MySQL port (3306) is used by "" (mysqld-nt.exe)! > > Any suggestions??? > > Thank you. > > ------------------------------ > Send e-mail faster without improving your typing skills. Get your Hotmail(R) > account. > > _______________________________________________ > Instantrails-users mailing list > Instantrails-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/instantrails-users > -- Rob Bazinet InfoQ Ruby Editor http://www.accidentaltechnologist.com http://www.infoq.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From snajang at hotmail.com Tue Dec 16 17:02:00 2008 From: snajang at hotmail.com (S Ajang) Date: Tue, 16 Dec 2008 22:02:00 +0000 Subject: [Instantrails-users] Can't Start MySQL via Instant Rails Console In-Reply-To: References: Message-ID: Thanks. The icon for MySQL in InstantRails is red (stopped), so how can I check to see if MySQL is running? Also, I need to access rails>configure > database (via MyPHPAdmin), but the link is in the drop down menu is grey'd out. How can I access MyPHPAdmin via InstantRails? Thanks. Date: Tue, 16 Dec 2008 15:01:18 -0500From: rbazinet at gmail.comTo: instantrails-users at rubyforge.orgSubject: Re: [Instantrails-users] Can't Start MySQL via Instant Rails ConsoleMySQL is already running, either from InstantRails or you have it installed on your system. -Rob Bazinet On Tue, Dec 16, 2008 at 2:42 PM, S Ajang wrote: The following error is displayed in Instant Rails Console: MySQL port (3306) is used by "" (mysqld-nt.exe)! Any suggestions??? Thank you. Send e-mail faster without improving your typing skills. Get your Hotmail? account._______________________________________________Instantrails-users mailing listInstantrails-users at rubyforge.orghttp://rubyforge.org/mailman/listinfo/instantrails-users-- Rob BazinetInfoQ Ruby Editorhttp://www.accidentaltechnologist.comhttp://www.infoq.com _________________________________________________________________ Send e-mail faster without improving your typing skills. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008 -------------- next part -------------- An HTML attachment was scrubbed... URL: From giorgio.clavelli at gmail.com Tue Dec 16 17:43:51 2008 From: giorgio.clavelli at gmail.com (Giorgio Clavelli) Date: Wed, 17 Dec 2008 08:43:51 +1000 Subject: [Instantrails-users] Can't Start MySQL via Instant Rails Console In-Reply-To: References: Message-ID: As Robert said, you have another copy of MySql already running on your system. I guess you are using a Windows PC and this copy of MySql is set to startup automatically with all other services that your system starts at boot up. If I'm right, you should check in "Settings/Control Panel/Administrative Tools/Services" (this is the path if you are using Win XP home). There you will find this other copy of MySql listed and very likely its startup type set to automatic. Just double click on it and set it to manual. Then either stop the Mysql service by a command prompt (can't remember the command, but something like "mysql stop") or just restart the PC. Hope it helps On Wed, Dec 17, 2008 at 8:02 AM, S Ajang wrote: > Thanks. The icon for MySQL in InstantRails is red (stopped), so how can I > check to see if > MySQL is running? > > Also, I need to access rails>configure > database (via MyPHPAdmin), but the > link is > in the drop down menu is grey'd out. How can I access MyPHPAdmin via > InstantRails? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From snajang at hotmail.com Tue Dec 16 18:52:44 2008 From: snajang at hotmail.com (S Ajang) Date: Tue, 16 Dec 2008 23:52:44 +0000 Subject: [Instantrails-users] Can't Start MySQL via Instant Rails Console In-Reply-To: References: Message-ID: Brilliant! I set Mysql service to manual, and it worked. Thanks!!! Date: Wed, 17 Dec 2008 08:43:51 +1000From: giorgio.clavelli at gmail.comTo: instantrails-users at rubyforge.orgSubject: Re: [Instantrails-users] Can't Start MySQL via Instant Rails ConsoleAs Robert said, you have another copy of MySql already running on your system. I guess you are using a Windows PC and this copy of MySql is set to startup automatically with all other services that your system starts at boot up. If I'm right, you should check in "Settings/Control Panel/Administrative Tools/Services" (this is the path if you are using Win XP home). There you will find this other copy of MySql listed and very likely its startup type set to automatic. Just double click on it and set it to manual. Then either stop the Mysql service by a command prompt (can't remember the command, but something like "mysql stop") or just restart the PC.Hope it helps On Wed, Dec 17, 2008 at 8:02 AM, S Ajang wrote: Thanks. The icon for MySQL in InstantRails is red (stopped), so how can I check to see if MySQL is running? Also, I need to access rails>configure > database (via MyPHPAdmin), but the link is in the drop down menu is grey'd out. How can I access MyPHPAdmin via InstantRails? _________________________________________________________________ Suspicious message? There?s an alert for that. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad2_122008 -------------- next part -------------- An HTML attachment was scrubbed... URL: From giorgio.clavelli at gmail.com Tue Dec 16 19:36:28 2008 From: giorgio.clavelli at gmail.com (Giorgio Clavelli) Date: Wed, 17 Dec 2008 10:36:28 +1000 Subject: [Instantrails-users] Can't Start MySQL via Instant Rails Console In-Reply-To: References: Message-ID: Glad it worked out. Another thing. I guess the MySql service you just set to manual and so stopped, you were using it with another programming language. Remember to start it again, when you will work with it. The best way is by using a command prompt. You should easily find the correct syntax in MySql manual, probabily under Daemon, as often it is called like this. regards Giorgio On Wed, Dec 17, 2008 at 9:52 AM, S Ajang wrote: > Brilliant! I set Mysql service to manual, and it worked. > > Thanks!!! > > ------------------------------ > Date: Wed, 17 Dec 2008 08:43:51 +1000 > From: giorgio.clavelli at gmail.com > To: instantrails-users at rubyforge.org > Subject: Re: [Instantrails-users] Can't Start MySQL via Instant Rails > Console > > As Robert said, you have another copy of MySql already running on your > system. I guess you are using a Windows PC and this copy of MySql is set to > startup automatically with all other services that your system starts at > boot up. > If I'm right, you should check in "Settings/Control Panel/Administrative > Tools/Services" (this is the path if you are using Win XP home). There you > will find this other copy of MySql listed and very likely its startup type > set to automatic. Just double click on it and set it to manual. Then either > stop the Mysql service by a command prompt (can't remember the command, but > something like "mysql stop") or just restart the PC. > > Hope it helps > > > On Wed, Dec 17, 2008 at 8:02 AM, S Ajang wrote: > > Thanks. The icon for MySQL in InstantRails is red (stopped), so how can I > check to see if > MySQL is running? > > Also, I need to access rails>configure > database (via MyPHPAdmin), but the > link is > in the drop down menu is grey'd out. How can I access MyPHPAdmin via > InstantRails? > > > ------------------------------ > Suspicious message? There's an alert for that. Get your Hotmail(R) account > now. > > _______________________________________________ > Instantrails-users mailing list > Instantrails-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/instantrails-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: