Scott Peterson wrote:
> Norm wrote:
>   
>> Scott Peterson wrote:
>>     
>>> Upon trying that, I get:
>>> Thank you.
>>>   
>>>       
>> It sounds like your app was written using rails 1.2.x.  I think you
>> should try loading InstantRails 1.7 (which has that version of rails)
>> and make sure you can run the app on that and then you can try to port
>> the app to rails 2.0 which is on IR 2.x.  You can have both versions of
>> IR installed (but not running) on you system without any problem.  Just
>> install under unique names.
>>     
>
> Thanks for the idea, Norm, but I really hadn't done enough to make it 
> worthwhile to save, just generated a couple of controllers/models etc 
> and did some light playing around.
>
> I am really having a heck of a time getting going on 2.0.  After 
> downloading, I can use cookbook and typo just fine.  So, I used the 
> rails command to start my new application's framework, but I want to 
> this guy to use mysql instead.
>
> I changed database.yml to point to mysql and gave it my database's name, 
> but I can't get the application to start from the InstantRails 
> interface.  The command window closes after just a second or two, and I 
> don't see anything being logged anywhere.
>
> I've created the development data in mysql, granted rights on database.* 
> to myself, but it won't come up.  I even tried configuring the 
> application with the root username, no dice.
>
> Something simple I'm sure, but I've got nothing.
>   
I like to use the console to explore some of those issues.  Bring up a 
"ruby console" window in IR and (from the top directory of the app) try 
"ruby script/console".  You can then try to access your database and see 
what the reaction is.  Try something like "a=Tablename.new" to see what 
happens when the app tries to get the attributes of the ar class.  When 
that works you can try things like "b=Tablename.find :all" to fetch all 
of the members of a particular ar class.  (Both of the Tablenames are an 
AR class so they should be singular where the table is plural).  If you 
can access the tables you know your database connection works so you can 
go on to other problems.

Good luck


--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to