I use rails 2.3.2. The server use 2.1.1. What do I do? Make a new app on my side based on 2.1.1? If yes, how do I do that? -- Posted via http://www.ruby-forum.com/.
2009/7/8 Pål Bergström <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > I use rails 2.3.2. The server use 2.1.1. What do I do? Make a new app on > my side based on 2.1.1? If yes, how do I do that? > -- >The best plan would be to get the server updated if possible. Colin
On Jul 8, 2:15 pm, Pål Bergström <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I use rails 2.3.2. The server use 2.1.1. What do I do? Make a new app on > my side based on 2.1.1? If yes, how do I do that?The long way would be to install 2.1.1 via "gem install rails -v 2.1.1" and change the Rails version for the app in config/ environment.rb.
Eric wrote:> On Jul 8, 2:15�pm, P�l Bergstr�m <rails-mailing-l...@andreas-s.net> > wrote: >> I use rails 2.3.2. The server use 2.1.1. What do I do? Make a new app on >> my side based on 2.1.1? If yes, how do I do that? > > The long way would be to install 2.1.1 via "gem install rails -v > 2.1.1" and change the Rails version for the app in config/ > environment.rb.Thanks. I think I''ll do that. Can change that in environment.rb without making any other changes, considering the app is done for 2.3.2? -- Posted via http://www.ruby-forum.com/.
On Jul 8, 3:24 pm, Pål Bergström <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Eric wrote: > > On Jul 8, 2:15 pm, P l Bergstr m <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > wrote: > >> I use rails 2.3.2. The server use 2.1.1. What do I do? Make a new app on > >> my side based on 2.1.1? If yes, how do I do that? > > > The long way would be to install 2.1.1 via "gem install rails -v > > 2.1.1" and change the Rails version for the app in config/ > > environment.rb. > > Thanks. I think I''ll do that. Can change that in environment.rb without > making any other changes, considering the app is done for 2.3.2?You will probably have to make other changes too, depending on how the app itself is written. -eric
On Wed, Jul 8, 2009 at 5:25 PM, Colin Law<clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> > 2009/7/8 Pål Bergström <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>: >> >> I use rails 2.3.2. The server use 2.1.1. What do I do? Make a new app on >> my side based on 2.1.1? If yes, how do I do that? >> -- >> > > The best plan would be to get the server updated if possible.Another options is to put rails 2.3.2 into the app structure itself: On the development machine rake rails:freeze:gems This puts unpacks the gems which comprise rails ( activerecord, activesupport, actionpack etc) under the vendor/rails Assuming that deployment is via a repository (svn, git...) commit the application making sure that vendor/rails is placed under version control. Then it doesn''t matter what the current ''official'' rails version is on the server, it will use the same version you use in development. This is a bonus both ways, you can use a later version than the one installed as gems on the server, and you are isolated if the ''it guys'' update the rails gems without telling you, something which can easily break your app. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale
Eric wrote:> On Jul 8, 3:24�pm, P�l Bergstr�m <rails-mailing-l...@andreas-s.net> > wrote: >> Thanks. I think I''ll do that. Can change that in environment.rb without >> making any other changes, considering the app is done for 2.3.2? > > You will probably have to make other changes too, depending on how the > app itself is written. > > -ericWhat about creating a new app, can I specify what version to use? Like: rails newapp -d mysql -v 2.1.1 Or something? -- Posted via http://www.ruby-forum.com/.
Rick Denatale wrote:> On Wed, Jul 8, 2009 at 5:25 PM, Colin Law<clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >>> Another options is to put rails 2.3.2 into the app structure itself: > > On the development machine > > rake rails:freeze:gems >I might do this. What about updates? Will a new freeze get the latest versions? And I can always unfreeze, right? -- Posted via http://www.ruby-forum.com/.
On Jul 9, 9:42 am, Pål Bergström <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Rick Denatale wrote: > > On Wed, Jul 8, 2009 at 5:25 PM, Colin Law<clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > Another options is to put rails 2.3.2 into the app structure itself: > > > On the development machine > > > rake rails:freeze:gems > > I might do this. What about updates? Will a new freeze get the latest > versions? And I can always unfreeze, right?Freezing unpacks the gems into vendor/rails. Unfreezing is a simple as blowing away that directory (there''s probably a rake task that does that too) Fred
Rick Denatale wrote:> On Wed, Jul 8, 2009 at 5:25 PM, Colin Law<clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> rake rails:freeze:gemsA possibly stupid question, but why do I get a .gem directory in my home directory when I do freeze? Well I get the idea, but why not keep the .gem in the app root or somewhere? What happens with my other apps running, they will use the .gem too, right? I run rails for development under LSWS that I have installed in my home directory, with me as a user (to keep it simple). Everything else is gem and Macports. -- Posted via http://www.ruby-forum.com/.
On Jul 9, 9:59 am, Pål Bergström <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Rick Denatale wrote: > > On Wed, Jul 8, 2009 at 5:25 PM, Colin Law<clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > rake rails:freeze:gems > > A possibly stupid question, but why do I get a .gem directory in my home > directory when I do freeze? Well I get the idea, but why not keep the > .gem in the app root or somewhere? What happens with my other apps > running, they will use the .gem too, right? >.gem isn''t used for frozen stuff. It''s something gem does in some cases when ran as a user that can''t write to the system wide gem location. Fred> I run rails for development under LSWS that I have installed in my home > directory, with me as a user (to keep it simple). Everything else is gem > and Macports. > -- > Posted viahttp://www.ruby-forum.com/.
On Thu, Jul 9, 2009 at 6:32 AM, Frederick Cheung<frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > On Jul 9, 9:59 am, Pål Bergström <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: >> Rick Denatale wrote: >> > On Wed, Jul 8, 2009 at 5:25 PM, Colin Law<clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> > rake rails:freeze:gems >> >> A possibly stupid question, but why do I get a .gem directory in my home >> directory when I do freeze? Well I get the idea, but why not keep the >> .gem in the app root or somewhere? What happens with my other apps >> running, they will use the .gem too, right? >> > > .gem isn''t used for frozen stuff. It''s something gem does in some > cases when ran as a user that can''t write to the system wide gem > location.Yep, one of my peeves with gem is that it does this. I always want gems to be installed in the system location, if I forget to sudo gem I don''t want it to be installed in my home directory. I finally removed all permisions from my ~/.gem directory so if I forget, it let''s me know rather than giving me a useless install. chmod 000 ~/.gem -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale
Rick Denatale wrote:> On Thu, Jul 9, 2009 at 6:32 AM, Frederick> I finally removed all permisions from my ~/.gem directory so if I > forget, it let''s me know rather than giving me a useless install. > > chmod 000 ~/.gem >Clever. Thanks for the suggestion. :-) -- Posted via http://www.ruby-forum.com/.
hi, the rails command accepts the version number, by prefixing and appending the version number by underscore. eg: rails _2.2.2_ newapp -d mysql Deepak On Jul 9, 12:40 pm, Pål Bergström <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Eric wrote: > > On Jul 8, 3:24 pm, P l Bergstr m <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > wrote: > >> Thanks. I think I''ll do that. Can change that in environment.rb without > >> making any other changes, considering the app is done for 2.3.2? > > > You will probably have to make other changes too, depending on how the > > app itself is written. > > > -eric > > What about creating a new app, can I specify what version to use? Like: > > rails newapp -d mysql -v 2.1.1 > > Or something? > -- > Posted viahttp://www.ruby-forum.com/.
deepak wrote:> hi, > the rails command accepts the version number, by prefixing and > appending the version number by underscore. > eg: rails _2.2.2_ newapp -d mysql > > Deepak > > On Jul 9, 12:40�pm, P�l Bergstr�m <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>Good to know. -- Posted via http://www.ruby-forum.com/.