MySQL normally installs in one place, and rails seems to know this. I need to install a newer version for Rails, without disrupting existing users. Where do I tell Rails where to look for that version? I can''t find this info in the Rails book, and googling didn''t turn up much that seemed relevant. Thank you, Hugh
I''ve not seen a response to this yet. If I''ve missed an obvious place I should have looked, could someone point me at it, please? Thank you, Hugh On Wed, 31 Aug 2005, Hugh Sasse wrote:> MySQL normally installs in one place, and rails seems to know this. > I need to install a newer version for Rails, without disrupting > existing users. Where do I tell Rails where to look for that > version? I can''t find this info in the Rails book, and googling > didn''t turn up much that seemed relevant. > > Thank you, > Hugh
Add the complete rails installation in the vendor directory in the rails application you want to use a newer version. I am myself using "edge Rails" for one project, without interrupting other projects. Check the wiki for edge rails, and you'll also find the info on how to install rails there. HTH, Ronny On 9/5/05, Hugh Sasse <hgs@dmu.ac.uk> wrote:> > I've not seen a response to this yet. If I've missed an obvious > place I should have looked, could someone point me at it, please? > Thank you, > Hugh > > On Wed, 31 Aug 2005, Hugh Sasse wrote: > > > MySQL normally installs in one place, and rails seems to know this. > > I need to install a newer version for Rails, without disrupting > > existing users. Where do I tell Rails where to look for that > > version? I can't find this info in the Rails book, and googling > > didn't turn up much that seemed relevant. > > > > Thank you, > > Hugh > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On Mon, 5 Sep 2005, Ronny Hanssen wrote:> Add the complete rails installation in the vendor directory in the > rails application you want to use a newer version. I am myself > using "edge Rails" for one project, without interrupting other > projects. Check the wiki for edge rails, and you''ll also find the > info on how to install rails there.Thank you. However, that seems to answer the question "How do I run two different versions of Rails on the same server?", whereas I need the answer to "How do I run one version of rails on a server with 2 versions of MySQL, picking the appropriate version of MySQL for use with Rails?" [I was curious about the former question as well, so it''s nice to know that is supported.]> HTH, > RonnyThank you, Hugh
Ronny Hanssen wrote:> Add the complete rails installation in the vendor directory in the rails > application you want to use a newer version. I am myself using "edge Rails" > for one project, without interrupting other projects. Check the wiki for > edge rails, and you''ll also find the info on how to install rails there.Ronny, I think he''s asking how to install multiple MySQL versions on the same machine, not multiple Rails versions. Hugh, is there any reason you don''t want to upgrade your entire machine to a newer MySQL version? How many users are we talking about here? Schedule an hour or so of downtime and just go for it - there shouldn''t be any features in newer versions of MySQL that will break older stuff, as far as I know. In fact, I''d be surprised if you need to do any more than just compile the new version, install it and then restart the daemon. MySQL upgrades tend to be fairly painless, although obviously if it''s a business critical machine you might want to test it somewhere else first to make sure it''s going to work! Alternatively, I would guess that all you need to do to install a second version of MySQL would be to download the source, compile it and then install it manually wherever you want to put it. Then take a look at this for instructions on running multiple MySQL servers on a single machine: http://mysqld.active-venture.com/Multiple_servers.html Then in your Rails database.yml file, you need to set... socket: /tmp/mysql.sock ... or wherever your second install''s socket file lives (this is set in your MySQL "my.cnf" file) for each of your three databases. One more alternative - if you don''t want to futz with your other users'' MySQL stuff, how about using PostgreSQL for your Rails apps? I made the switch from MySQL -> PostgreSQL at the same time as PHP -> Rails, and PostgreSQL has been great so far, as well as very powerful. (I''m not saying any more than that on the subject, since it can rapidly turn into a OT flamefest!) Anyway, I have MySQL and PostgreSQL running happily on the same machine, and it was very easy to set up. HTH! ~Dave -- Dave Silvester Rent-A-Monkey Website Development Web: http://www.rentamonkey.com/
On Mon, 5 Sep 2005, Dave Silvester wrote:> Ronny Hanssen wrote: >> Add the complete rails installation in the vendor directory in the rails >> application you want to use a newer version. I am myself using "edge Rails" >> for one project, without interrupting other projects. Check the wiki for >> edge rails, and you''ll also find the info on how to install rails there. > > Ronny, I think he''s asking how to install multiple MySQL versions on the same > machine, not multiple Rails versions.Yes, but thanks anyway.> > Hugh, is there any reason you don''t want to upgrade your entire machine to a > newer MySQL version? How many users are we talking about here?Yes, I''m not the only one using it, we are using it for teaching, and I don''t know enough to disturb a setup that may affect others in ways I am unaware of. I''ve asked those in the know if it would be OK to upgrade, but have no definite response yet.> Schedule an > hour or so of downtime and just go for it - there shouldn''t be any features > in newer versions of MySQL that will break older stuff, as far as I know. InWe''d be moving from 3.x to 4.x, so I''d expect some breakage. [...]> Alternatively, I would guess that all you need to do to install a second > version of MySQL would be to download the source, compile it and then install > it manually wherever you want to put it.Yes, that part''s clear, but I can''t see where to tell rails to look for it.> > Then take a look at this for instructions on running multiple MySQL servers > on a single machine: http://mysqld.active-venture.com/Multiple_servers.htmlthanks for that, I''ll explore it.> > Then in your Rails database.yml file, you need to set... > > socket: /tmp/mysql.sock > > ... or wherever your second install''s socket file lives (this is set in your > MySQL "my.cnf" file) for each of your three databases.Thank you. I suppose knowing where the socket is should be sufficient info for comms to take place, so hopefully that''s all there is to it.> > One more alternative - if you don''t want to futz with your other users'' MySQL > stuff, how about using PostgreSQL for your Rails apps? I made the switchI thought about that, but I''m new to rails, have done little with DB''s before, and feel it''s one more wafer thin mint of complexity :-)> from MySQL -> PostgreSQL at the same time as PHP -> Rails, and PostgreSQL has > been great so far, as well as very powerful. (I''m not saying any more thanI''ve no doubt about its quality, its just I''ve enough to handle without the differences tripping me up.> that on the subject, since it can rapidly turn into a OT flamefest!) > > Anyway, I have MySQL and PostgreSQL running happily on the same machine, and > it was very easy to set up.OK, if I get stuck I''ll give that further consideration.> > HTH!Yes, thank you.> > ~Dave >Hugh
Hugh Sasse wrote:> Yes, I''m not the only one using it, we are using it for teaching, > and I don''t know enough to disturb a setup that may affect others in > ways I am unaware of. I''ve asked those in the know if it would be > OK to upgrade, but have no definite response yet. > > We''d be moving from 3.x to 4.x, so I''d expect some breakage. > [...]OK, if you haven''t already, you need to read: http://dev.mysql.com/doc/mysql/en/upgrading-from-3-23.html I''d be surprised if there are any major breakages. I''ve upgraded MySQL 3 -> 4 several times on different (website database only) setups, and never had any major problems. In fact, the only problem I recall was to do with case sensitivity on table names, or something like that, so I had to change a few of my PHP scripts, but I think that might have been from MySQL 4.0 to 4.1. (Still, don''t take my word for it!) Since you''re using it for teaching, I''m guessing it''s probably not being heavily used 24 hours a day? How about you make a backup of the existing system, then try the upgrade out of teaching hours? Don''t universities nearly always have sysadmin monkeys who''s job is to do this kind of stuff for the academic staff anyway? ;-) (I look upon "monkey" as a favourable term, having been called it enough times myself and eventually adopting it as... well, just check my domain name!)> Yes, that part''s clear, but I can''t see where to tell rails to look > for it. > [...] > Thank you. I suppose knowing where the socket is should be > sufficient info for comms to take place, so hopefully that''s all > there is to it.That''s all there is to it. ;-)> I''ve no doubt about its quality, its just I''ve enough to handle > without the differences tripping me up.Fair enough, PostgreSQL is a little bit more complicated than MySQL.> Yes, thank you.You''re welcome! PS. Are you based in Leicester? I''m in Nottingham! So when it all goes wrong, you won''t have far to send the boys round to break my legs. LOL! ;-) ~Dave -- Dave Silvester Rent-A-Monkey Website Development Web: http://www.rentamonkey.com/
The only tricky thing moving from 4.0 to 4.1 that I've encountered is that you need to update all your password fields. Other than that, smooth as silk. Although I use PostgreSQL as my main development/production database. Jacob On 9/6/05, Dave Silvester <dave@rentamonkey.com> wrote:> Hugh Sasse wrote: > > Yes, I'm not the only one using it, we are using it for teaching, > > and I don't know enough to disturb a setup that may affect others in > > ways I am unaware of. I've asked those in the know if it would be > > OK to upgrade, but have no definite response yet. > > > > We'd be moving from 3.x to 4.x, so I'd expect some breakage. > > [...] > > OK, if you haven't already, you need to read: > > http://dev.mysql.com/doc/mysql/en/upgrading-from-3-23.html > > I'd be surprised if there are any major breakages. I've upgraded MySQL 3 -> 4 > several times on different (website database only) setups, and never had any > major problems. In fact, the only problem I recall was to do with case > sensitivity on table names, or something like that, so I had to change a few > of my PHP scripts, but I think that might have been from MySQL 4.0 to 4.1. > (Still, don't take my word for it!) > > Since you're using it for teaching, I'm guessing it's probably not being > heavily used 24 hours a day? How about you make a backup of the existing > system, then try the upgrade out of teaching hours? > > Don't universities nearly always have sysadmin monkeys who's job is to do this > kind of stuff for the academic staff anyway? ;-) (I look upon "monkey" as a > favourable term, having been called it enough times myself and eventually > adopting it as... well, just check my domain name!) > > > Yes, that part's clear, but I can't see where to tell rails to look > > for it. > > [...] > > Thank you. I suppose knowing where the socket is should be > > sufficient info for comms to take place, so hopefully that's all > > there is to it. > > That's all there is to it. ;-) > > > I've no doubt about its quality, its just I've enough to handle > > without the differences tripping me up. > > Fair enough, PostgreSQL is a little bit more complicated than MySQL. > > > Yes, thank you. > > You're welcome! > > PS. Are you based in Leicester? I'm in Nottingham! So when it all goes > wrong, you won't have far to send the boys round to break my legs. LOL! ;-) > > ~Dave > > -- > > Dave Silvester > Rent-A-Monkey Website Development > Web: http://www.rentamonkey.com/ > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails