With the exception of certain Oracle DB''s, am I wrong to assume that I can connect to other types of DBs simply by changing the adapter parameter in /config/database.yaml? (that seems too simple). If so, what databses (i.e. the exact strings I would put in for the adapter parameter) can I connect to? Lastly, can someone show me an example of connecting to various Oracle databases? Thank you. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ike wrote:> With the exception of certain Oracle DB''s, am I wrong to assume that I > can connect to other types of DBs simply by changing the adapter > parameter in /config/database.yaml? (that seems too simple). If so, > what databses (i.e. the exact strings I would put in for the adapter > parameter) can I connect to? > > Lastly, can someone show me an example of connecting to various Oracle > databases? Thank you.http://dev.rubyonrails.org/browser/trunk/activerecord/lib/active_record/connection_adapters From this section of the source it looks like you can simply remove the "_adapter.rb" from any of those filenames. I have only ever used MySQL though so I can''t be sure, but I am pretty confident thats the way it works. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''ve done some Rails work with Oracle, but it was long enough ago that I''ve forgotten the specific changes required - you should be able to search this mailing list to find details. I know things have become simpler since I was working with Oracle early last year, but it was fairly straightforward even then. There were problems with sequence numbers and a few other bits and pieces, but they were straightened out a long time ago within Rails and you shouldn''t have to worry about them now. In general, to work with a different database, the only file you''ll need to change is database.yaml. Now, if you''re already some way down the track developing on MySQL and you decide to switch to Oracle, there will be migration required, but if it''s a new project, just change that one file and you''re done. With SQLite, which I''ve been using lately, you need to specify a "dbfile" parameter instead of a "database" parameter - it''s not just a straight matter of changing the existing parameter fields in the file. However, all the config is within that one file. Regards Dave M. On 09/11/06, Ike <rvince99-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> > With the exception of certain Oracle DB''s, am I wrong to assume that I > can connect to other types of DBs simply by changing the adapter > parameter in /config/database.yaml? (that seems too simple). If so, > what databses (i.e. the exact strings I would put in for the adapter > parameter) can I connect to? > > Lastly, can someone show me an example of connecting to various Oracle > databases? Thank you. > > > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---