Different version of RoR on server

View: New views
15 Messages — Rating Filter:   Alert me  

Different version of RoR on server

by Tim Mcd-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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/.

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


Re: Different version of RoR on server

by Colin Law-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


2009/7/8 Pål Bergström <rails-mailing-list@...>:
>
> 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

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


Re: Different version of RoR on server

by Eric Hill-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Jul 8, 2:15 pm, Pål Bergström <rails-mailing-l...@...>
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.
--~--~---------~--~----~------------~-------~--~----~
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@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Different version of RoR on server

by Tim Mcd-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Eric wrote:
> On Jul 8, 2:15�pm, P�l Bergstr�m <rails-mailing-l...@...>
> 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/.

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


Re: Different version of RoR on server

by Eric Hill-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Jul 8, 3:24 pm, Pål Bergström <rails-mailing-l...@...>
wrote:

> Eric wrote:
> > On Jul 8, 2:15 pm, P l Bergstr m <rails-mailing-l...@...>
> > 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
--~--~---------~--~----~------------~-------~--~----~
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@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Different version of RoR on server

by Rick DeNatale :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Wed, Jul 8, 2009 at 5:25 PM, Colin Law<clanlaw@...> wrote:
>
> 2009/7/8 Pål Bergström <rails-mailing-list@...>:
>>
>> 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

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


Re: Different version of RoR on server

by Tim Mcd-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Eric wrote:
> On Jul 8, 3:24�pm, P�l Bergstr�m <rails-mailing-l...@...>
> 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 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@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Different version of RoR on server

by Tim Mcd-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Rick Denatale wrote:
> On Wed, Jul 8, 2009 at 5:25 PM, Colin Law<clanlaw@...> 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/.

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


Re: Different version of RoR on server

by Frederick Cheung-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Jul 9, 9:42 am, Pål Bergström <rails-mailing-l...@...>
wrote:

> Rick Denatale wrote:
> > On Wed, Jul 8, 2009 at 5:25 PM, Colin Law<clan...@...> 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
--~--~---------~--~----~------------~-------~--~----~
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@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Different version of RoR on server

by Tim Mcd-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Rick Denatale wrote:
> On Wed, Jul 8, 2009 at 5:25 PM, Colin Law<clanlaw@...> 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?

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/.

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


Re: Different version of RoR on server

by Frederick Cheung-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message




On Jul 9, 9:59 am, Pål Bergström <rails-mailing-l...@...>
wrote:
> Rick Denatale wrote:
> > On Wed, Jul 8, 2009 at 5:25 PM, Colin Law<clan...@...> 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/.
--~--~---------~--~----~------------~-------~--~----~
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@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Different version of RoR on server

by Rick DeNatale :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Thu, Jul 9, 2009 at 6:32 AM, Frederick
Cheung<frederick.cheung@...> wrote:

>
>
>
> On Jul 9, 9:59 am, Pål Bergström <rails-mailing-l...@...>
> wrote:
>> Rick Denatale wrote:
>> > On Wed, Jul 8, 2009 at 5:25 PM, Colin Law<clan...@...> 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

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


Re: Different version of RoR on server

by Tim Mcd-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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/.

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


Re: Different version of RoR on server

by deepak-23 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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...@...>
wrote:

> Eric wrote:
> > On Jul 8, 3:24 pm, P l Bergstr m <rails-mailing-l...@...>
> > 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/.
--~--~---------~--~----~------------~-------~--~----~
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@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Different version of RoR on server

by Tim Mcd-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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...@...>

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